1
- # syntax=docker/dockerfile:1.3
1
+ # syntax=docker/dockerfile:1.4
2
2
FROM debian:bullseye-slim
3
3
4
4
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
@@ -8,20 +8,21 @@ ARG NGINX_PLUS_VERSION
8
8
# Install NGINX Plus
9
9
# Download certificate and key from the customer portal (https://my.f5.com)
10
10
# and copy to the build context
11
- SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
12
11
RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 \
13
12
--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
25
26
26
27
# Forward request logs to Docker log collector
27
28
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
@@ -32,7 +33,7 @@ EXPOSE 80
32
33
STOPSIGNAL SIGQUIT
33
34
34
35
RUN 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/
37
38
38
39
CMD ["nginx" , "-g" , "daemon off;" ]
0 commit comments