Skip to content

Commit e3ce05b

Browse files
committed
Use pkgs when calling apt install
1 parent ff432a5 commit e3ce05b

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

docker/debian/Dockerfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,18 @@ RUN set -ex ;\
2525
dpkg-reconfigure --frontend noninteractive tzdata
2626

2727
# Install tools that are shared by all stages.
28-
RUN apt install -y build-essential \
29-
ca-certificates \
30-
cmake \
31-
curl \
32-
git \
33-
gpg \
34-
libssl-dev \
35-
libprotobuf-dev \
36-
ninja-build \
37-
protobuf-compiler
28+
RUN <<EOF
29+
pkgs=()
30+
pkgs+=(build-essential) # Required build tools.
31+
pkgs+=(ca-certificates) # Enable TLS verification for HTTPS connections by providing trusted root certificates.
32+
pkgs+=(cmake) # Required build tool.
33+
pkgs+=(curl) # Dependency for tools requiring downloading data.
34+
pkgs+=(git) # Required build tool.
35+
pkgs+=(gpg) # Dependency for tools requiring signing or encrypting/decrypting.
36+
pkgs+=(jq) # Pretty printing.
37+
pkgs+=(ninja-build) # Required build tool.
38+
apt install -y "${pkgs[@]}"
39+
EOF
3840

3941
# Install Conan.
4042
ARG CONAN_VERSION=2.17.0

docker/ubuntu/Dockerfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,18 @@ RUN set -ex ;\
1616
dpkg-reconfigure --frontend noninteractive tzdata
1717

1818
# Install tools that are shared by all stages.
19-
RUN apt install -y build-essential \
20-
ca-certificates \
21-
cmake \
22-
curl \
23-
git \
24-
gpg \
25-
libssl-dev \
26-
libprotobuf-dev \
27-
ninja-build \
28-
protobuf-compiler
19+
RUN <<EOF
20+
pkgs=()
21+
pkgs+=(build-essential) # Required build tools.
22+
pkgs+=(ca-certificates) # Enable TLS verification for HTTPS connections by providing trusted root certificates.
23+
pkgs+=(cmake) # Required build tool.
24+
pkgs+=(curl) # Dependency for tools requiring downloading data.
25+
pkgs+=(git) # Required build tool.
26+
pkgs+=(gpg) # Dependency for tools requiring signing or encrypting/decrypting.
27+
pkgs+=(jq) # Pretty printing.
28+
pkgs+=(ninja-build) # Required build tool.
29+
apt install -y "${pkgs[@]}"
30+
EOF
2931

3032
# Install Conan.
3133
ARG CONAN_VERSION=2.17.0

0 commit comments

Comments
 (0)