Skip to content

Commit cbd2121

Browse files
committed
Dockerfile: Move "&&" to the beginning of lines
And make other minor changes to more closely align with the conventions used in the "Best practices for writing Dockerfiles" https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ No actual function change in this commit.
1 parent 803e482 commit cbd2121

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

Dockerfile

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Author: Joost van Ulden <joost.vanulden@canada.ca>
44
#
5-
# Copyright (c) 2020 Government of Canada
5+
# Copyright (c) 2020-2022 Government of Canada
66
#
77
# Permission is hereby granted, free of charge, to any person
88
# obtaining a copy of this software and associated documentation
@@ -38,21 +38,37 @@ LABEL org.opencontainers.image.licenses="MIT"
3838
# copy required files
3939
COPY . .
4040

41-
RUN echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/docker-snapshot.conf && \
42-
sed -i '/snapshot.debian.org/s/^# //; /deb.debian.org/s/^/# /' /etc/apt/sources.list && \
43-
echo "deb http://deb.debian.org/debian bullseye main" >> /etc/apt/sources.list && \
44-
echo 'Package: *\n\
41+
RUN echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/docker-snapshot.conf \
42+
&& sed -i '/snapshot.debian.org/s/^# //; /deb.debian.org/s/^/# /' /etc/apt/sources.list \
43+
&& echo "deb http://deb.debian.org/debian bullseye main" >> /etc/apt/sources.list \
44+
&& echo 'Package: *\n\
4545
Pin: release n=bullseye\n\
46-
Pin-Priority: 50' > /etc/apt/preferences.d/git-in-bullseye && \
47-
cat /etc/apt/preferences.d/git-in-bullseye && \
48-
apt-get update && \
49-
apt-get install -y --no-install-recommends \
50-
curl gdal-bin postgresql-client \
51-
dos2unix eatmydata jq moreutils nano time xz-utils \
52-
python3-numpy python3-pandas python3-psycopg2 python3-psycopg2cffi \
53-
python3-requests python3-sqlalchemy pypy3 python3-pip && \
54-
apt-get install -y --no-install-recommends -t bullseye git git-lfs && \
55-
pip3 install elasticsearch==7.16.1 && \
56-
rm -rf /var/lib/apt/lists/*
46+
Pin-Priority: 50' > /etc/apt/preferences.d/git-in-bullseye \
47+
&& cat /etc/apt/preferences.d/git-in-bullseye \
48+
&& apt-get update \
49+
&& apt-get install -y --no-install-recommends \
50+
curl \
51+
dos2unix \
52+
eatmydata \
53+
gdal-bin \
54+
jq \
55+
moreutils \
56+
nano \
57+
postgresql-client \
58+
pypy3 \
59+
python3-numpy \
60+
python3-pandas \
61+
python3-psycopg2 \
62+
python3-psycopg2cffi \
63+
python3-requests \
64+
python3-sqlalchemy \
65+
python3-pip \
66+
time \
67+
xz-utils \
68+
&& apt-get install -y --no-install-recommends -t bullseye \
69+
git \
70+
git-lfs \
71+
&& pip3 install elasticsearch==7.16.1 \
72+
&& rm -rf /var/lib/apt/lists/*
5773

5874
ENV PYTHONUNBUFFERED 1

0 commit comments

Comments
 (0)