-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile.dev
More file actions
58 lines (49 loc) · 1.91 KB
/
Dockerfile.dev
File metadata and controls
58 lines (49 loc) · 1.91 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
52
53
54
55
56
57
58
# syntax=docker/dockerfile:1.4
# Development image with all tools (Elixir, Rust, Node, Flutter, Chrome)
FROM elixir:1.19
# Install build dependencies and development tools
RUN apt-get update -qq && \
apt-get install -y \
build-essential \
git \
inotify-tools \
curl \
sqlite3 \
libsqlite3-dev \
libpq-dev \
postgresql-client \
ffmpeg \
chromium \
chromium-driver \
ca-certificates \
xz-utils \
gosu 2>/dev/null || true && \
(which node || (curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && apt-get install -y nodejs)) && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* 2>/dev/null || true
# Install Rust if not present
RUN which rustc || (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable && \
chmod -R a+w /opt/rustup /opt/cargo 2>/dev/null || true)
# Install Flutter if not present
RUN which flutter || ( \
curl -L https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.38.6-stable.tar.xz -o flutter.tar.xz && \
tar xf flutter.tar.xz -C /opt && \
rm flutter.tar.xz && \
git config --global --add safe.directory /opt/flutter && \
flutter config --no-analytics && \
flutter precache --web --no-android --no-ios --no-linux --no-windows --no-macos --no-fuchsia && \
chmod -R a+w /opt/flutter)
# Install Hex and Rebar if not present
RUN mix local.hex --force && mix local.rebar --force 2>/dev/null || true
# Environment variables for tools (paths set in base image)
ENV RUSTUP_HOME=/opt/rustup
ENV CARGO_HOME=/opt/cargo
ENV PATH="${CARGO_HOME}/bin:${PATH}"
ENV FLUTTER_HOME=/opt/flutter
ENV PATH="${FLUTTER_HOME}/bin:${PATH}"
WORKDIR /app
# Copy entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
EXPOSE 4000
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]