Skip to content

Commit af9c56e

Browse files
committed
Move gnupg installation to Dockerfile
We use gnupg for apt key verification so we should install it once to allow further streamlining of the build process. We currently install it and remove it multiple times, and because it is not a part of the base build, we have to do additional apt processes just to install it before we add custom repos.
1 parent 0a08d32 commit af9c56e

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN echo "Building for ${TARGETPLATFORM}"
77

88
# Install some packages that are useful within the images.
99
RUN apt-get update && apt-get install -y \
10-
git \
10+
git gnupg \
1111
&& rm -rf /var/lib/apt/lists/*
1212

1313
# Install pickle as an easier alternative to PECL, that is not

root/tmp/setup/php-extensions.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
echo "Installing apt dependencies"
66

77
# Build packages will be added during the build, but will be removed at the end.
8-
BUILD_PACKAGES="gettext gnupg libcurl4-openssl-dev libfreetype6-dev libicu-dev libjpeg62-turbo-dev \
8+
BUILD_PACKAGES="gettext libcurl4-openssl-dev libfreetype6-dev libicu-dev libjpeg62-turbo-dev \
99
libldap2-dev libmariadb-dev libmemcached-dev libpng-dev libpq-dev libxml2-dev libxslt-dev \
1010
unixodbc-dev uuid-dev"
1111

root/tmp/setup/sqlsrv-extension.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [[ ${TARGETPLATFORM} != "linux/amd64" ]]; then
88
fi
99

1010
# Packages for build.
11-
BUILD_PACKAGES="gnupg unixodbc-dev"
11+
BUILD_PACKAGES="unixodbc-dev"
1212

1313
# Packages for sqlsrv runtime.
1414
PACKAGES_SQLSRV="unixodbc"
@@ -28,6 +28,11 @@ curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
2828
curl https://packages.microsoft.com/config/debian/10/prod.list -o /etc/apt/sources.list.d/mssql-release.list
2929
apt-get update
3030

31+
echo "Installing apt dependencies"
32+
apt-get install -y --no-install-recommends apt-transport-https \
33+
$BUILD_PACKAGES \
34+
$PACKAGES_SQLSRV
35+
3136
echo "Install msodbcsql"
3237
ACCEPT_EULA=Y apt-get install -y msodbcsql17
3338

0 commit comments

Comments
 (0)