1- # syntax=docker/dockerfile:1.3
1+ # syntax=docker/dockerfile:1.4
22FROM debian:bullseye-slim
33
44LABEL maintainer=
"NGINX Docker Maintainers <[email protected] >" @@ -8,20 +8,21 @@ ARG NGINX_PLUS_VERSION
88# Install NGINX Plus
99# Download certificate and key from the customer portal (https://my.f5.com)
1010# and copy to the build context
11- SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
1211RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 \
1312 --mount=type=secret,id=nginx-repo.key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \
14- apt-get update \
15- && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates gnupg curl apt-transport-https \
16- && curl -sSL https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx_signing.gpg \
17- && curl -sSL -o /etc/apt/apt.conf.d/90pkgs-nginx https://cs.nginx.com/static/files/90pkgs-nginx \
18- && DEBIAN_VERSION=$(awk -F '=' '/^VERSION_CODENAME=/ {print $2}' /etc/os-release) \
19- && printf "%s\n " "deb https://pkgs.nginx.com/plus/${NGINX_PLUS_VERSION^^}/debian ${DEBIAN_VERSION} nginx-plus" > /etc/apt/sources.list.d/nginx-plus.list \
20- && apt-get update && apt-get install -y nginx-plus-${NGINX_PLUS_VERSION} \
21- && apt-get remove --purge --auto-remove -y gnupg \
22- && rm -rf /var/lib/apt/lists/* \
23- && rm /etc/apt/apt.conf.d/90pkgs-nginx /etc/apt/sources.list.d/nginx-plus.list
24-
13+ <<"eot" bash -euo pipefail
14+ apt-get update
15+ apt-get install --no-install-recommends --no-install-suggests -y ca-certificates gnupg curl apt-transport-https
16+ curl -fsSL https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx_signing.gpg
17+ curl -fsSL -o /etc/apt/apt.conf.d/90pkgs-nginx https://cs.nginx.com/static/files/90pkgs-nginx
18+ DEBIAN_VERSION=$(awk -F '=' '/^VERSION_CODENAME=/ {print $2}' /etc/os-release)
19+ printf "%s\n " "deb https://pkgs.nginx.com/plus/${NGINX_PLUS_VERSION^^}/debian ${DEBIAN_VERSION} nginx-plus" > /etc/apt/sources.list.d/nginx-plus.list
20+ apt-get update
21+ apt-get install -y nginx-plus-${NGINX_PLUS_VERSION}
22+ apt-get remove --purge --auto-remove -y gnupg
23+ rm -rf /var/lib/apt/lists/*
24+ rm /etc/apt/apt.conf.d/90pkgs-nginx /etc/apt/sources.list.d/nginx-plus.list
25+ eot
2526
2627# Forward request logs to Docker log collector
2728RUN ln -sf /dev/stdout /var/log/nginx/access.log \
@@ -32,7 +33,7 @@ EXPOSE 80
3233STOPSIGNAL SIGQUIT
3334
3435RUN rm -rf /etc/nginx/conf.d/*
35- COPY test.conf /etc/nginx/conf.d/
36- COPY nginx.conf /etc/nginx/
36+ COPY --link test.conf /etc/nginx/conf.d/
37+ COPY --link nginx.conf /etc/nginx/
3738
3839CMD ["nginx" , "-g" , "daemon off;" ]
0 commit comments