-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
51 lines (41 loc) · 1.34 KB
/
Dockerfile.dev
File metadata and controls
51 lines (41 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# For DEVELOPMENT environment
FROM elixir:1.18.4-otp-26-slim
# Install system-level dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
unzip \
python3 \
postgresql-client \
inotify-tools \
bash \
procps \
curl \
wget \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Install Bun for fast JavaScript package management and bundling
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:$PATH"
# Install uv for fast Python package management
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
# Install Debian FFmpeg package for proper DNS resolution
RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& ffmpeg -version
# Force IPv4 preference to avoid DNS stalls with CloudFront
RUN echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf
# --- Set up the Python Virtual Environment ---
RUN uv venv /opt/venv
ENV VIRTUAL_ENV="/opt/venv"
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# --- Install Python Dependencies into the Virtual Environment ---
WORKDIR /app
COPY py/pyproject.toml py/uv.lock ./py/
RUN uv sync --project py --frozen --no-dev --no-install-project --active
# --- Pre-install Elixir tools ---
RUN mix local.hex --force && \
mix local.rebar --force
CMD ["/bin/sh"]