-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #812 from nginx/fix-make-image-targets
Fix make image targets
- Loading branch information
Showing
15 changed files
with
77 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ FROM ${BASE_IMAGE} as install | |
LABEL maintainer="NGINX Docker Maintainers <[email protected]>" | ||
|
||
ARG PACKAGES_REPO | ||
ARG NGINX_AGENT_VERSION | ||
|
||
WORKDIR /agent | ||
COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh | ||
|
@@ -58,11 +59,12 @@ RUN --mount=type=secret,id=nginx-crt,dst=/etc/apk/cert.pem \ | |
&& printf "https://$PACKAGES_REPO/nginx-agent/alpine/v`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release`/main/\n" | tee -a /etc/apk/repositories \ | ||
&& nginxPackages=" \ | ||
nginx-plus \ | ||
nginx-agent \ | ||
" \ | ||
&& apk update \ | ||
&& apk add $nginxPackages | ||
|
||
RUN if [ -z "$NGINX_AGENT_VERSION" ]; then apk add nginx-agent; else apk add "nginx-agent=${NGINX_AGENT_VERSION}"; fi | ||
|
||
# run the nginx and agent | ||
FROM install as runtime | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ FROM ${BASE_IMAGE} as install | |
LABEL maintainer="NGINX Docker Maintainers <[email protected]>" | ||
|
||
ARG PACKAGES_REPO | ||
ARG NGINX_AGENT_VERSION | ||
|
||
WORKDIR /agent | ||
COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh | ||
|
@@ -36,7 +37,6 @@ RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ | |
# Use versioned packages over defaults to specify a release | ||
&& nginxPackages=" \ | ||
nginx-plus \ | ||
nginx-agent \ | ||
" \ | ||
&& echo "Acquire::https::$PACKAGES_REPO::Verify-Peer \"true\";" > /etc/apt/apt.conf.d/90nginx \ | ||
&& echo "Acquire::https::$PACKAGES_REPO::Verify-Host \"true\";" >> /etc/apt/apt.conf.d/90nginx \ | ||
|
@@ -51,10 +51,13 @@ RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ | |
&& apt-get install --no-install-recommends --no-install-suggests -y \ | ||
$nginxPackages \ | ||
curl \ | ||
gettext-base \ | ||
&& apt-get autoremove --purge -y \ | ||
gnupg \ | ||
lsb-release \ | ||
gettext-base | ||
|
||
RUN if [ -z "$NGINX_AGENT_VERSION" ]; then apt-get install -y nginx-agent; else apt-get install -y nginx-agent=${NGINX_AGENT_VERSION}; fi | ||
|
||
RUN apt-get autoremove --purge -y \ | ||
gnupg \ | ||
lsb-release \ | ||
&& rm -rf /root/.gnupg \ | ||
&& apt-get remove --purge --auto-remove -y && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx-plus.list \ | ||
&& rm -rf /etc/apt/apt.conf.d/90nginx /etc/ssl/nginx | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ LABEL maintainer="NGINX Docker Maintainers <[email protected]>" | |
ARG BASE_IMAGE | ||
ARG PACKAGES_REPO | ||
ARG OS_VERSION | ||
ARG NGINX_AGENT_VERSION | ||
|
||
WORKDIR /agent | ||
COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh | ||
|
@@ -24,7 +25,6 @@ RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ | |
&& usermod -L nginx \ | ||
&& nginxPackages=" \ | ||
nginx-plus \ | ||
nginx-agent \ | ||
" \ | ||
&& printf "[nginx-plus] \n\ | ||
name=nginx-plus repo \n\ | ||
|
@@ -44,8 +44,11 @@ gpgcheck=1 \n\ | |
enabled=1 \n\ | ||
sslverify=true \n\ | ||
gpgkey=https://nginx.org/keys/nginx_signing.key" >> /etc/yum.repos.d/nginx-agent.repo \ | ||
&& yum install -y $nginxPackages \ | ||
&& yum clean all \ | ||
&& yum install -y $nginxPackages | ||
|
||
RUN if [ -z "$NGINX_AGENT_VERSION" ]; then yum install -y nginx-agent; else yum install -y nginx-agent-${NGINX_AGENT_VERSION}; fi | ||
|
||
RUN yum clean all \ | ||
&& rm -rf /var/cache/yum /etc/yum.repos.d/* /etc/ssl/nginx | ||
|
||
FROM install as runtime | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ LABEL maintainer="NGINX Docker Maintainers <[email protected]>" | |
|
||
ARG PACKAGES_REPO | ||
ARG OS_VERSION | ||
ARG NGINX_AGENT_VERSION | ||
|
||
WORKDIR /agent | ||
COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh | ||
|
@@ -24,7 +25,6 @@ RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ | |
&& usermod -s /sbin/nologin nginx \ | ||
&& usermod -L nginx \ | ||
&& nginxPackages=" \ | ||
nginx-agent \ | ||
nginx-plus \ | ||
" \ | ||
&& printf "[nginx-plus] \n\ | ||
|
@@ -45,8 +45,11 @@ gpgcheck=1 \n\ | |
enabled=1 \n\ | ||
sslverify=true \n\ | ||
gpgkey=https://nginx.org/keys/nginx_signing.key" >> /etc/yum.repos.d/nginx-agent.repo \ | ||
&& yum install -y $nginxPackages \ | ||
&& yum clean all \ | ||
&& yum install -y $nginxPackages | ||
|
||
RUN if [ -z "$NGINX_AGENT_VERSION" ]; then yum install -y nginx-agent; else yum install -y nginx-agent-${NGINX_AGENT_VERSION}; fi | ||
|
||
RUN yum clean all \ | ||
&& rm -rf /var/cache/yum /etc/yum.repos.d/* /etc/ssl/nginx | ||
|
||
FROM install as runtime | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ LABEL maintainer="NGINX Docker Maintainers <[email protected]>" | |
|
||
ARG OS_VERSION | ||
ARG PACKAGES_REPO | ||
ARG NGINX_AGENT_VERSION | ||
|
||
WORKDIR /agent | ||
COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh | ||
|
@@ -22,7 +23,6 @@ RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ | |
&& zypper install ca-certificates \ | ||
&& nginxPackages=" \ | ||
nginx-plus \ | ||
nginx-agent \ | ||
" \ | ||
&& if [ "$OS_VERSION" = "sles12sp5" ]; then \ | ||
zypper addrepo -G -c "https://$PACKAGES_REPO/plus/sles/12?ssl_clientcert=/etc/ssl/nginx/nginx-repo-bundle.crt&ssl_verify=peer" nginx-plus \ | ||
|
@@ -32,8 +32,10 @@ RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ | |
&& zypper addrepo -G -c "https://$PACKAGES_REPO/nginx-agent/sles/15?ssl_clientcert=/etc/ssl/nginx/nginx-repo-bundle.crt&ssl_verify=peer" nginx-agent; \ | ||
fi \ | ||
&& zypper refresh \ | ||
&& zypper install -y $nginxPackages \ | ||
&& rm -rf /etc/ssl/nginx/nginx-repo-bundle.crt /etc/ssl/nginx | ||
&& zypper install -y $nginxPackages | ||
|
||
RUN if [ -z "$NGINX_AGENT_VERSION" ]; then zypper install -y nginx-agent; else zypper install -y nginx-agent=${NGINX_AGENT_VERSION}; fi | ||
RUN rm -rf /etc/ssl/nginx/nginx-repo-bundle.crt /etc/ssl/nginx | ||
|
||
FROM install as runtime | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ FROM ${BASE_IMAGE} as install | |
LABEL maintainer="NGINX Docker Maintainers <[email protected]>" | ||
|
||
ARG PACKAGES_REPO | ||
ARG NGINX_AGENT_VERSION | ||
|
||
RUN echo $PACKAGES_REPO | ||
WORKDIR /agent | ||
|
@@ -37,7 +38,6 @@ RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ | |
# Install the latest release of NGINX Plus and/or NGINX Plus modules and NGINX Agent | ||
&& nginxPackages=" \ | ||
nginx-plus \ | ||
nginx-agent \ | ||
" \ | ||
&& echo "Acquire::https::$PACKAGES_REPO::Verify-Peer \"true\";" > /etc/apt/apt.conf.d/90nginx \ | ||
&& echo "Acquire::https::$PACKAGES_REPO::Verify-Host \"true\";" >> /etc/apt/apt.conf.d/90nginx \ | ||
|
@@ -51,8 +51,10 @@ RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ | |
&& cat /nginx-repo.crt >> /etc/ssl/nginx/nginx-repo.crt \ | ||
&& cat /nginx-repo.key >> /etc/ssl/nginx/nginx-repo.key \ | ||
&& apt-get update \ | ||
&& apt-get install $nginxPackages -y \ | ||
&& rm /etc/ssl/nginx/nginx-repo.crt /etc/ssl/nginx/nginx-repo.key | ||
&& apt-get install $nginxPackages -y | ||
|
||
RUN if [ -z "$NGINX_AGENT_VERSION" ]; then apt-get install -y nginx-agent; else apt-get install -y nginx-agent=${NGINX_AGENT_VERSION}; fi | ||
RUN rm /etc/ssl/nginx/nginx-repo.crt /etc/ssl/nginx/nginx-repo.key | ||
|
||
# run the nginx and agent | ||
FROM install as runtime | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters