Skip to content

Commit 4565ae4

Browse files
committed
Configure UserAgent for apt in DockerfileForPlus
1 parent 5a51de8 commit 4565ae4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ endif
3838

3939
container: test nginx-ingress certificate-and-key
4040
cp $(DOCKERFILEPATH)/$(DOCKERFILE) ./Dockerfile
41-
docker build $(DOCKER_BUILD_OPTIONS) -f Dockerfile -t $(PREFIX):$(TAG) .
41+
docker build $(DOCKER_BUILD_OPTIONS) --build-arg IC_VERSION=$(VERSION)-$(GIT_COMMIT) -f Dockerfile -t $(PREFIX):$(TAG) .
4242

4343
push: container
4444
ifeq ($(PUSH_TO_GCR),1)

build/DockerfileForPlus

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM debian:stretch-slim
33
LABEL maintainer="NGINX Docker Maintainers <[email protected]>"
44

55
ENV NGINX_PLUS_VERSION 17-1~stretch
6+
ARG IC_VERSION
67

78
# Download certificate and key from the customer portal (https://cs.nginx.com)
89
# and copy to the build context
@@ -33,6 +34,7 @@ RUN set -x \
3334
&& echo "Acquire::https::plus-pkgs.nginx.com::Verify-Host \"true\";" >> /etc/apt/apt.conf.d/90nginx \
3435
&& echo "Acquire::https::plus-pkgs.nginx.com::SslCert \"/etc/ssl/nginx/nginx-repo.crt\";" >> /etc/apt/apt.conf.d/90nginx \
3536
&& echo "Acquire::https::plus-pkgs.nginx.com::SslKey \"/etc/ssl/nginx/nginx-repo.key\";" >> /etc/apt/apt.conf.d/90nginx \
37+
&& echo "Acquire::https::plus-pkgs.nginx.com::User-Agent \"k8s-ic-$IC_VERSION-apt\";" >> /etc/apt/apt.conf.d/90nginx \
3638
&& printf "deb https://plus-pkgs.nginx.com/debian stretch nginx-plus\n" > /etc/apt/sources.list.d/nginx-plus.list \
3739
&& apt-get update && apt-get install -y nginx-plus=${NGINX_PLUS_VERSION} \
3840
&& apt-get remove --purge --auto-remove -y gnupg1 \

0 commit comments

Comments
 (0)