Skip to content

Commit 54a767e

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 1593ce6 commit 54a767e

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
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-7
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,23 @@ 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"
1515

16-
echo "Installing apt dependencies"
17-
apt-get update
18-
apt-get install -y --no-install-recommends apt-transport-https \
19-
$BUILD_PACKAGES \
20-
$PACKAGES_SQLSRV
21-
2216
# Install Microsoft dependencies for sqlsrv
2317
echo "Downloading sqlsrv files"
2418
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
2519
# TODO, bullseye should be 11, but the msodbcsql17 package is not available yet, hence using buster (10) one.
2620
curl https://packages.microsoft.com/config/debian/10/prod.list -o /etc/apt/sources.list.d/mssql-release.list
2721
apt-get update
2822

23+
echo "Installing apt dependencies"
24+
apt-get install -y --no-install-recommends apt-transport-https \
25+
$BUILD_PACKAGES \
26+
$PACKAGES_SQLSRV
27+
2928
echo "Install msodbcsql"
3029
ACCEPT_EULA=Y apt-get install -y msodbcsql17
3130

0 commit comments

Comments
 (0)