Skip to content

Commit

Permalink
Dockerfile: run apt-get upgrade
Browse files Browse the repository at this point in the history
The GDAL image in the "FROM" directive
can be several months old, this ensures
the latest Ubuntu package updates
(with security fixes) are in
the OWS image.
  • Loading branch information
pjonsson committed Nov 24, 2023
1 parent 859c143 commit e9f29d7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ FROM ghcr.io/osgeo/gdal:ubuntu-small-3.8.0 as builder

# Setup build env for postgresql-client-14
USER root
RUN apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing --no-install-recommends \
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y --fix-missing --no-install-recommends \
git \
# For pybabel
python3-distutils \
Expand Down Expand Up @@ -38,6 +40,12 @@ RUN pip freeze
# Should match builder base.
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.8.0

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -y \
&& apt-get upgrade -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/dpkg/* /var/tmp/* /var/log/dpkg.log

# all the python pip installed libraries
COPY --from=builder /usr/local/lib/python3.10/dist-packages /usr/local/lib/python3.10/dist-packages
COPY --from=builder /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages
Expand Down

0 comments on commit e9f29d7

Please sign in to comment.