Remove wgrib2 from Docker build — replaced by pure Elixir decoder
Drops gfortran, wget, cmake from builder and libgomp1 from runner. Eliminates the slowest step in the Docker build (~5 min wgrib2 compile).
This commit is contained in:
parent
e2f5376355
commit
e5b65ca2bc
1 changed files with 3 additions and 11 deletions
14
Dockerfile
14
Dockerfile
|
|
@ -20,17 +20,11 @@ ARG RUNNER_IMAGE="docker.io/debian:${DEBIAN_VERSION}"
|
||||||
|
|
||||||
FROM ${BUILDER_IMAGE} AS builder
|
FROM ${BUILDER_IMAGE} AS builder
|
||||||
|
|
||||||
# install build dependencies and build wgrib2
|
# install build dependencies
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends build-essential git gfortran wget cmake \
|
&& apt-get install -y --no-install-recommends build-essential git \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN wget -q https://www.ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz \
|
|
||||||
&& tar xzf wgrib2.tgz && cd grib2 \
|
|
||||||
&& CC=gcc FC=gfortran make \
|
|
||||||
&& cp wgrib2/wgrib2 /usr/local/bin/ \
|
|
||||||
&& cd .. && rm -rf grib2 wgrib2.tgz
|
|
||||||
|
|
||||||
# prepare build dir
|
# prepare build dir
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
@ -77,11 +71,9 @@ RUN mix release
|
||||||
FROM ${RUNNER_IMAGE} AS final
|
FROM ${RUNNER_IMAGE} AS final
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends libstdc++6 openssl libncurses6 locales ca-certificates libgomp1 \
|
&& apt-get install -y --no-install-recommends libstdc++6 openssl libncurses6 locales ca-certificates \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=builder /usr/local/bin/wgrib2 /usr/local/bin/wgrib2
|
|
||||||
|
|
||||||
# Set the locale
|
# Set the locale
|
||||||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
|
||||||
&& locale-gen
|
&& locale-gen
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue