fix: correct paths for hexpm/elixir image structure
The hexpm images install Erlang and Elixir in /usr/local instead of /usr/lib. Changes: - Copy from /usr/local/lib/erlang instead of /usr/lib/erlang - Copy all Erlang/Elixir binaries from /usr/local/bin - Remove manual symlink creation (binaries already exist) - Binaries are symlinks to ../lib/erlang/bin and ../lib/elixir/bin
This commit is contained in:
parent
7685fa53d1
commit
26a3b39edd
1 changed files with 9 additions and 8 deletions
|
|
@ -20,13 +20,19 @@ FROM docker.io/debian:${DEBIAN_VERSION}
|
|||
LABEL maintainer="towerops"
|
||||
LABEL description="Minimal Debian 13 with Erlang/OTP and Elixir runtime"
|
||||
|
||||
# Copy Erlang and Elixir from builder
|
||||
COPY --from=builder /usr/lib/erlang /usr/lib/erlang
|
||||
# Copy Erlang and Elixir from builder (hexpm image uses /usr/local)
|
||||
COPY --from=builder /usr/local/lib/erlang /usr/local/lib/erlang
|
||||
COPY --from=builder /usr/local/lib/elixir /usr/local/lib/elixir
|
||||
|
||||
# Copy all Erlang/Elixir binaries (they're symlinks to lib dirs)
|
||||
COPY --from=builder /usr/local/bin/erl /usr/local/bin/erl
|
||||
COPY --from=builder /usr/local/bin/erlc /usr/local/bin/erlc
|
||||
COPY --from=builder /usr/local/bin/escript /usr/local/bin/escript
|
||||
COPY --from=builder /usr/local/bin/epmd /usr/local/bin/epmd
|
||||
COPY --from=builder /usr/local/bin/elixir /usr/local/bin/elixir
|
||||
COPY --from=builder /usr/local/bin/elixirc /usr/local/bin/elixirc
|
||||
COPY --from=builder /usr/local/bin/iex /usr/local/bin/iex
|
||||
COPY --from=builder /usr/local/bin/mix /usr/local/bin/mix
|
||||
COPY --from=builder /usr/local/lib/elixir /usr/local/lib/elixir
|
||||
|
||||
# Install only essential runtime dependencies
|
||||
# This is the absolute minimum needed for Erlang/Elixir + Phoenix apps
|
||||
|
|
@ -55,11 +61,6 @@ ENV LANG=en_US.UTF-8
|
|||
ENV LANGUAGE=en_US:en
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
|
||||
# Create symlinks for Erlang binaries
|
||||
RUN ln -s /usr/lib/erlang/bin/erl /usr/local/bin/erl \
|
||||
&& ln -s /usr/lib/erlang/bin/erlc /usr/local/bin/erlc \
|
||||
&& ln -s /usr/lib/erlang/bin/escript /usr/local/bin/escript
|
||||
|
||||
# Add nobody user for security (already exists in Debian)
|
||||
RUN mkdir -p /app && chown nobody:nogroup /app
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue