Clean up Dockerfile: remove unused deps, comments, and redundant lines
This commit is contained in:
parent
9aef372985
commit
bb514112bf
1 changed files with 3 additions and 15 deletions
18
Dockerfile
18
Dockerfile
|
|
@ -25,7 +25,7 @@ ARG WGRIB2_VERSION=3.6.1
|
|||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
build-essential gfortran cmake wget ca-certificates git \
|
||||
build-essential gfortran cmake wget ca-certificates \
|
||||
zlib1g-dev libaec-dev libpng-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
|
@ -99,31 +99,19 @@ RUN apt-get update \
|
|||
libgfortran5 libaec0 zlib1g libpng16-16t64 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set the locale
|
||||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
|
||||
&& locale-gen
|
||||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
||||
|
||||
ENV LANG=en_US.UTF-8
|
||||
ENV LANGUAGE=en_US:en
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
ENV MIX_ENV="prod"
|
||||
|
||||
WORKDIR "/app"
|
||||
RUN chown nobody /app
|
||||
|
||||
# set runner ENV
|
||||
ENV MIX_ENV="prod"
|
||||
|
||||
# Copy wgrib2 binary from the build stage
|
||||
COPY --from=wgrib2-builder /usr/local/bin/wgrib2 /usr/local/bin/wgrib2
|
||||
|
||||
# Only copy the final release from the build stage
|
||||
COPY --from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/microwaveprop ./
|
||||
|
||||
USER nobody
|
||||
|
||||
# If using an environment that doesn't automatically reap zombie processes, it is
|
||||
# advised to add an init process such as tini via `apt-get install`
|
||||
# above and adding an entrypoint. See https://github.com/krallin/tini for details
|
||||
# ENTRYPOINT ["/tini", "--"]
|
||||
|
||||
CMD ["/app/bin/server"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue