Skip to content

Commit

Permalink
update nginx dockerfile-sample-1
Browse files Browse the repository at this point in the history
  • Loading branch information
BretFisher committed Jan 27, 2024
1 parent 859aeaf commit cbba283
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dockerfile-sample-1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
# to match the latest standards from docker hub... but it's doing the same thing as the video
# describes

FROM debian:bullseye-slim
FROM debian:bookworm-slim
# all images must have a FROM
# usually from a minimal Linux distribution like debian or (even better) alpine
# if you truly want to start with an empty container, use FROM scratch

LABEL maintainer="NGINX Docker Maintainers <[email protected]>"

# optional environment variable that's used in later lines and set as envvar when container is running
ENV NGINX_VERSION 1.23.4
ENV NJS_VERSION 0.7.11
ENV PKG_RELEASE 1~bullseye
ENV NGINX_VERSION 1.25.3
ENV NJS_VERSION 0.8.2
ENV PKG_RELEASE 1~bookworm


RUN set -x \
# create nginx user/group first, to be consistent throughout docker variants
&& addgroup --system --gid 101 nginx \
&& adduser --system --disabled-login --ingroup nginx --no-create-home --home /nonexistent --gecos "nginx user" --shell /bin/false --uid 101 nginx \
&& groupadd --system --gid 101 nginx \
&& useradd --system --gid nginx --no-create-home --home /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 ca-certificates \
&& \
Expand Down Expand Up @@ -50,13 +50,13 @@ RUN set -x \
&& case "$dpkgArch" in \
amd64|arm64) \
# arches officialy built by upstream
echo "deb [signed-by=$NGINX_GPGKEY_PATH] https://nginx.org/packages/mainline/debian/ bullseye nginx" >> /etc/apt/sources.list.d/nginx.list \
echo "deb [signed-by=$NGINX_GPGKEY_PATH] https://nginx.org/packages/mainline/debian/ bookworm nginx" >> /etc/apt/sources.list.d/nginx.list \
&& apt-get update \
;; \
*) \
# we're on an architecture upstream doesn't officially build for
# let's build binaries from the published source packages
echo "deb-src [signed-by=$NGINX_GPGKEY_PATH] https://nginx.org/packages/mainline/debian/ bullseye nginx" >> /etc/apt/sources.list.d/nginx.list \
echo "deb-src [signed-by=$NGINX_GPGKEY_PATH] https://nginx.org/packages/mainline/debian/ bookworm nginx" >> /etc/apt/sources.list.d/nginx.list \
\
# new directory for storing sources and .deb files
&& tempDir="$(mktemp -d)" \
Expand Down

0 comments on commit cbba283

Please sign in to comment.