From b88ad8380db9bc2e4a7e35571bd740cd4a9f4143 Mon Sep 17 00:00:00 2001 From: aphralG <108004222+aphralG@users.noreply.github.com> Date: Tue, 17 Sep 2024 13:35:19 +0100 Subject: [PATCH] remove official images, move testing images (#838) --- .github/workflows/ci.yml | 2 +- Makefile | 32 ++------- examples/grafana-metrics/docker-compose.yml | 4 +- .../alpine/Dockerfile.mainline | 28 -------- .../alpine/Dockerfile.stable | 28 -------- .../alpine/docker-compose.yml | 9 --- .../alpine/entrypoint.sh | 55 ---------------- .../alpine/Dockerfile | 65 ------------------- .../alpine/docker-compose.yml | 9 --- .../alpine/entrypoint.sh | 55 ---------------- .../docker/agentless-entrypoint.sh | 0 {scripts => test}/docker/entrypoint.sh | 0 .../apk/Dockerfile | 0 .../deb/Dockerfile | 0 .../docker/nginx-oss/apk/Dockerfile | 0 .../docker/nginx-oss/deb/Dockerfile | 0 .../docker/nginx-oss/rpm/Dockerfile | 0 .../docker/nginx-plus/almalinux/Dockerfile | 2 +- .../docker/nginx-plus/alpine/Dockerfile | 2 +- .../docker/nginx-plus/amazonlinux/Dockerfile | 2 +- .../docker/nginx-plus/centos/Dockerfile | 2 +- .../docker/nginx-plus/debian/Dockerfile | 2 +- .../docker/nginx-plus/oraclelinux/Dockerfile | 2 +- .../nginx-plus/redhatenterprise/Dockerfile | 2 +- .../docker/nginx-plus/rockylinux/Dockerfile | 2 +- .../docker/nginx-plus/suse/Dockerfile | 2 +- .../docker/nginx-plus/ubuntu/Dockerfile | 2 +- test/docker/{ => performance}/Dockerfile | 0 .../api/docker-compose-official-image.yml | 2 +- test/integration/api/docker-compose.yml | 4 +- .../docker-compose-official-image.yml | 2 +- test/integration/features/docker-compose.yml | 4 +- .../grpc/docker-compose-official-image.yml | 2 +- test/integration/grpc/docker-compose.yml | 4 +- test/integration/install/docker-compose.yml | 4 +- 35 files changed, 28 insertions(+), 301 deletions(-) delete mode 100644 scripts/docker/official/nginx-oss-with-nginx-agent/alpine/Dockerfile.mainline delete mode 100644 scripts/docker/official/nginx-oss-with-nginx-agent/alpine/Dockerfile.stable delete mode 100644 scripts/docker/official/nginx-oss-with-nginx-agent/alpine/docker-compose.yml delete mode 100644 scripts/docker/official/nginx-oss-with-nginx-agent/alpine/entrypoint.sh delete mode 100644 scripts/docker/official/nginx-plus-with-nginx-agent/alpine/Dockerfile delete mode 100644 scripts/docker/official/nginx-plus-with-nginx-agent/alpine/docker-compose.yml delete mode 100644 scripts/docker/official/nginx-plus-with-nginx-agent/alpine/entrypoint.sh rename {scripts => test}/docker/agentless-entrypoint.sh (100%) rename {scripts => test}/docker/entrypoint.sh (100%) rename test/docker/{oss => nginx-official-image}/apk/Dockerfile (100%) rename test/docker/{oss => nginx-official-image}/deb/Dockerfile (100%) rename {scripts => test}/docker/nginx-oss/apk/Dockerfile (100%) rename {scripts => test}/docker/nginx-oss/deb/Dockerfile (100%) rename {scripts => test}/docker/nginx-oss/rpm/Dockerfile (100%) rename {scripts => test}/docker/nginx-plus/almalinux/Dockerfile (97%) rename {scripts => test}/docker/nginx-plus/alpine/Dockerfile (98%) rename {scripts => test}/docker/nginx-plus/amazonlinux/Dockerfile (97%) rename {scripts => test}/docker/nginx-plus/centos/Dockerfile (97%) rename {scripts => test}/docker/nginx-plus/debian/Dockerfile (98%) rename {scripts => test}/docker/nginx-plus/oraclelinux/Dockerfile (97%) rename {scripts => test}/docker/nginx-plus/redhatenterprise/Dockerfile (97%) rename {scripts => test}/docker/nginx-plus/rockylinux/Dockerfile (97%) rename {scripts => test}/docker/nginx-plus/suse/Dockerfile (97%) rename {scripts => test}/docker/nginx-plus/ubuntu/Dockerfile (98%) rename test/docker/{ => performance}/Dockerfile (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2f9b528ec..d44ad71709 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -318,7 +318,7 @@ jobs: - name: Build Docker Image uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 with: - file: test/docker/Dockerfile + file: test/docker/performance/Dockerfile tags: nginx-agent-benchmark:1.0.0 context: '.' push: false diff --git a/Makefile b/Makefile index 2d98830d55..1b63ffa215 100644 --- a/Makefile +++ b/Makefile @@ -286,7 +286,7 @@ certs: ## Generate TLS certificates image: ## Build agent container image for NGINX Plus, need nginx-repo.crt and nginx-repo.key in build directory @echo Building image with $(CONTAINER_CLITOOL); \ $(CONTAINER_BUILDENV) $(CONTAINER_CLITOOL) build -t ${IMAGE_TAG} . \ - --no-cache -f ./scripts/docker/nginx-plus/${OS_RELEASE}/Dockerfile \ + --no-cache -f ./test/docker/nginx-plus/${OS_RELEASE}/Dockerfile \ --secret id=nginx-crt,src=${CERTS_DIR}/nginx-repo.crt \ --secret id=nginx-key,src=${CERTS_DIR}/nginx-repo.key \ --build-arg CONTAINER_REGISTRY=${CONTAINER_REGISTRY} \ @@ -299,7 +299,7 @@ image: ## Build agent container image for NGINX Plus, need nginx-repo.crt and ng oss-image: ## Build agent container image for NGINX OSS @echo Building image with $(CONTAINER_CLITOOL); \ $(CONTAINER_BUILDENV) $(CONTAINER_CLITOOL) build -t ${IMAGE_TAG} . \ - --no-cache -f ./scripts/docker/nginx-oss/${CONTAINER_OS_TYPE}/Dockerfile \ + --no-cache -f ./test/docker/nginx-oss/${CONTAINER_OS_TYPE}/Dockerfile \ --target ${IMAGE_BUILD_TARGET} \ --build-arg PACKAGE_NAME=${PACKAGE_NAME} \ --build-arg PACKAGES_REPO=${OSS_PACKAGES_REPO} \ @@ -307,36 +307,12 @@ oss-image: ## Build agent container image for NGINX OSS --build-arg OS_RELEASE=${OS_RELEASE} \ --build-arg OS_VERSION=${OS_VERSION} \ --build-arg NGINX_AGENT_VERSION=${NGINX_AGENT_VERSION} \ - --build-arg ENTRY_POINT=./scripts/docker/entrypoint.sh + --build-arg ENTRY_POINT=./test/docker/entrypoint.sh run-container: ## Run container from specified IMAGE_TAG @echo Running ${IMAGE_TAG} with $(CONTAINER_CLITOOL); \ $(CONTAINER_CLITOOL) run -p 127.0.0.1:8081:8081/tcp --mount type=bind,source=${PWD}/nginx-agent.conf,target=/etc/nginx-agent/nginx-agent.conf ${IMAGE_TAG} - -official-plus-image: ## Build official NGINX Plus with NGINX Agent container image, need nginx-repo.crt and nginx-repo.key in build directory - @echo Building image nginx-plus-with-nginx-agent with $(CONTAINER_CLITOOL); \ - cd scripts/docker/official/nginx-plus-with-nginx-agent/alpine/ \ - && $(CONTAINER_BUILDENV) $(CONTAINER_CLITOOL) build -t nginx-plus-with-nginx-agent . \ - --no-cache -f ./Dockerfile \ - --secret id=nginx-crt,src=../../../../../${CERTS_DIR}/nginx-repo.crt \ - --secret id=nginx-key,src=../../../../../${CERTS_DIR}/nginx-repo.key - -official-oss-image: ## Build official NGINX OSS with NGINX Agent container image - @echo Building image nginx-oss-with-nginx-agent with $(CONTAINER_CLITOOL); \ - cd scripts/docker/official/nginx-oss-with-nginx-agent/alpine/ \ - && $(CONTAINER_BUILDENV) $(CONTAINER_CLITOOL) build -t nginx-oss-with-nginx-agent . \ - --build-arg NGINX_AGENT_VERSION=${VERSION} \ - --no-cache -f ./Dockerfile.mainline - -official-oss-stable-image: ## Build official NGINX OSS with NGINX Agent container stable image - @echo Building image nginx-oss-with-nginx-agent with $(CONTAINER_CLITOOL); \ - cd scripts/docker/official/nginx-oss-with-nginx-agent/alpine/ \ - && $(CONTAINER_BUILDENV) $(CONTAINER_CLITOOL) build -t nginx-oss-with-nginx-agent . \ - --build-arg NGINX_AGENT_VERSION=${VERSION} \ - --no-cache -f ./Dockerfile.stable - -official-oss-mainline-image: official-oss-image ## Build official NGINX OSS with NGINX Agent container mainline image - + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Grafana Example Dashboard Targets # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # diff --git a/examples/grafana-metrics/docker-compose.yml b/examples/grafana-metrics/docker-compose.yml index 5f9f5455b9..cb0cda9518 100644 --- a/examples/grafana-metrics/docker-compose.yml +++ b/examples/grafana-metrics/docker-compose.yml @@ -12,12 +12,12 @@ services: restart: unless-stopped build: context: ../../ - dockerfile: ./scripts/docker/nginx-oss/deb/Dockerfile + dockerfile: ./test/docker/nginx-oss/deb/Dockerfile target: install-agent-local args: PACKAGE_NAME: ${PACKAGE_NAME} BASE_IMAGE: ${BASE_IMAGE} - ENTRY_POINT: "./scripts/docker/entrypoint.sh" + ENTRY_POINT: "./test/docker/entrypoint.sh" volumes: - ./nginx.conf:/etc/nginx/nginx.conf - ./nginx-agent.conf:/etc/nginx-agent/nginx-agent.conf diff --git a/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/Dockerfile.mainline b/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/Dockerfile.mainline deleted file mode 100644 index e4e65ff189..0000000000 --- a/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/Dockerfile.mainline +++ /dev/null @@ -1,28 +0,0 @@ -ARG NGINX_VERSION=mainline-alpine-slim - -FROM nginx:${NGINX_VERSION} -LABEL maintainer="NGINX Docker Maintainers " - -ARG NGINX_AGENT_VERSION - -# Unlink symbolic links for access and error logs as the NGINX Agent -# requires both files to be able to monitor NGINX and provide metrics. -RUN unlink /var/log/nginx/access.log && unlink /var/log/nginx/error.log - -RUN set -x \ - && apk add curl bash iproute2 - -RUN printf "%s%s\n" \ - "http://packages.nginx.org/nginx-agent/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)" \ - "/main" | tee -a /etc/apk/repositories - -RUN curl -o /etc/apk/keys/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub - -RUN apk add nginx-agent=${NGINX_AGENT_VERSION} - -COPY ./entrypoint.sh /agent/entrypoint.sh -RUN chmod +x /agent/entrypoint.sh - -STOPSIGNAL SIGTERM - -ENTRYPOINT ["/agent/entrypoint.sh"] diff --git a/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/Dockerfile.stable b/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/Dockerfile.stable deleted file mode 100644 index 1cc6b3107c..0000000000 --- a/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/Dockerfile.stable +++ /dev/null @@ -1,28 +0,0 @@ -ARG NGINX_VERSION=stable-alpine-slim - -FROM nginx:${NGINX_VERSION} -LABEL maintainer="NGINX Docker Maintainers " - -ARG NGINX_AGENT_VERSION - -# Unlink symbolic links for access and error logs as the NGINX Agent -# requires both files to be able to monitor NGINX and provide metrics. -RUN unlink /var/log/nginx/access.log && unlink /var/log/nginx/error.log - -RUN set -x \ - && apk add curl bash iproute2 - -RUN printf "%s%s\n" \ - "http://packages.nginx.org/nginx-agent/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)" \ - "/main" | tee -a /etc/apk/repositories - -RUN curl -o /etc/apk/keys/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub - -RUN apk add nginx-agent=${NGINX_AGENT_VERSION} - -COPY ./entrypoint.sh /agent/entrypoint.sh -RUN chmod +x /agent/entrypoint.sh - -STOPSIGNAL SIGTERM - -ENTRYPOINT ["/agent/entrypoint.sh"] diff --git a/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/docker-compose.yml b/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/docker-compose.yml deleted file mode 100644 index 493ac9158a..0000000000 --- a/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/docker-compose.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: '3.9' - -services: - nginx-oss-with-nginx-agent: - image: nginx-oss-with-nginx-agent:latest - volumes: - - ../../../../../nginx-agent.conf:/etc/nginx-agent/nginx-agent.conf - ports: - - 8038:8038 diff --git a/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/entrypoint.sh b/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/entrypoint.sh deleted file mode 100644 index 9746d987cc..0000000000 --- a/scripts/docker/official/nginx-oss-with-nginx-agent/alpine/entrypoint.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -set -euxo pipefail - -handle_term() -{ - echo "received TERM signal" - echo "stopping nginx-agent ..." - kill -TERM "${agent_pid}" 2>/dev/null - echo "stopping nginx ..." - kill -TERM "${nginx_pid}" 2>/dev/null -} - -trap 'handle_term' TERM - -# Launch nginx -echo "starting nginx ..." -/usr/sbin/nginx -g "daemon off;" & - -nginx_pid=$! - -SECONDS=0 - -while ! ps -ef | grep "nginx: master process" | grep -v grep; do - if (( SECONDS > 5 )); then - echo "couldn't find nginx master process" - exit 1 - fi -done - -cat /etc/nginx-agent/nginx-agent.conf; - -# start nginx-agent, pass args -echo "starting nginx-agent ..." -nginx-agent "$@" & - -agent_pid=$! - -if [ $? != 0 ]; then - echo "couldn't start the agent, please check the log file" - exit 1 -fi - -wait_term() -{ - wait ${agent_pid} - trap - TERM - kill -QUIT "${nginx_pid}" 2>/dev/null - echo "waiting for nginx to stop..." - wait ${nginx_pid} -} - -wait_term - -echo "nginx-agent process has stopped, exiting." diff --git a/scripts/docker/official/nginx-plus-with-nginx-agent/alpine/Dockerfile b/scripts/docker/official/nginx-plus-with-nginx-agent/alpine/Dockerfile deleted file mode 100644 index 3470359723..0000000000 --- a/scripts/docker/official/nginx-plus-with-nginx-agent/alpine/Dockerfile +++ /dev/null @@ -1,65 +0,0 @@ -FROM alpine:3.17 -LABEL maintainer="NGINX Docker Maintainers " - -# Define NGINX versions for NGINX Plus and NGINX Plus modules -# Uncomment this block and the versioned nginxPackages in the main RUN -# instruction to install a specific release -# ENV NGINX_VERSION 29 -# ENV NJS_VERSION 0.7.12 -# ENV PKG_RELEASE 1 - -# Download certificate and key from the customer portal (https://account.f5.com) -# and copy to the build context -RUN --mount=type=secret,id=nginx-crt,dst=cert.pem \ - --mount=type=secret,id=nginx-key,dst=cert.key \ - set -x \ -# Create nginx user/group first, to be consistent throughout Docker variants - && addgroup -g 101 -S nginx \ - && adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \ -# Install the latest release of NGINX Plus and/or NGINX Plus modules -# Uncomment individual modules if necessary -# Use versioned packages over defaults to specify a release - && nginxPackages=" \ - nginx-plus \ - # nginx-plus=${NGINX_VERSION}-r${PKG_RELEASE} \ - # nginx-plus-module-xslt \ - # nginx-plus-module-xslt=${NGINX_VERSION}-r${PKG_RELEASE} \ - # nginx-plus-module-geoip \ - # nginx-plus-module-geoip=${NGINX_VERSION}-r${PKG_RELEASE} \ - # nginx-plus-module-image-filter \ - # nginx-plus-module-image-filter=${NGINX_VERSION}-r${PKG_RELEASE} \ - # nginx-plus-module-perl \ - # nginx-plus-module-perl=${NGINX_VERSION}-r${PKG_RELEASE} \ - # nginx-plus-module-njs \ - # nginx-plus-module-njs=${NGINX_VERSION}.${NJS_VERSION}-r${PKG_RELEASE} \ - " \ - KEY_SHA512="e09fa32f0a0eab2b879ccbbc4d0e4fb9751486eedda75e35fac65802cc9faa266425edf83e261137a2f4d16281ce2c1a5f4502930fe75154723da014214f0655" \ - && wget -O /tmp/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub \ - && if echo "$KEY_SHA512 */tmp/nginx_signing.rsa.pub" | sha512sum -c -; then \ - echo "key verification succeeded!"; \ - mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/; \ - else \ - echo "key verification failed!"; \ - exit 1; \ - fi \ - && cat cert.pem > /etc/apk/cert.pem \ - && cat cert.key > /etc/apk/cert.key \ - && apk add -X "https://pkgs.nginx.com/plus/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" --no-cache $nginxPackages \ - && apk add -X "https://pkgs.nginx.com/nginx-agent/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" --no-cache nginx-agent \ - && if [ -f "/etc/apk/keys/nginx_signing.rsa.pub" ]; then rm -f /etc/apk/keys/nginx_signing.rsa.pub; fi \ - && if [ -f "/etc/apk/cert.key" ] && [ -f "/etc/apk/cert.pem" ]; then rm -f /etc/apk/cert.key /etc/apk/cert.pem; fi \ -# Bring in tzdata so users could set the timezones through the environment -# variables - && apk add --no-cache tzdata \ -# Bring in curl and ca-certificates to make registering on DNS SD easier - && apk add --no-cache curl ca-certificates \ -# Bring in iproute2 so the nginx-agent can collect network metrics - && apk add --no-cache bash iproute2 - -COPY ./entrypoint.sh /agent/entrypoint.sh -RUN ls -ltr /agent/ -RUN chmod +x /agent/entrypoint.sh - -STOPSIGNAL SIGTERM - -ENTRYPOINT ["/agent/entrypoint.sh"] diff --git a/scripts/docker/official/nginx-plus-with-nginx-agent/alpine/docker-compose.yml b/scripts/docker/official/nginx-plus-with-nginx-agent/alpine/docker-compose.yml deleted file mode 100644 index 00490cf485..0000000000 --- a/scripts/docker/official/nginx-plus-with-nginx-agent/alpine/docker-compose.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: '3.9' - -services: - nginx-plus-with-nginx-agent: - image: nginx-plus-with-nginx-agent:latest - volumes: - - ../../../../../nginx-agent.conf:/etc/nginx-agent/nginx-agent.conf - ports: - - 8038:8038 diff --git a/scripts/docker/official/nginx-plus-with-nginx-agent/alpine/entrypoint.sh b/scripts/docker/official/nginx-plus-with-nginx-agent/alpine/entrypoint.sh deleted file mode 100644 index 9746d987cc..0000000000 --- a/scripts/docker/official/nginx-plus-with-nginx-agent/alpine/entrypoint.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -set -euxo pipefail - -handle_term() -{ - echo "received TERM signal" - echo "stopping nginx-agent ..." - kill -TERM "${agent_pid}" 2>/dev/null - echo "stopping nginx ..." - kill -TERM "${nginx_pid}" 2>/dev/null -} - -trap 'handle_term' TERM - -# Launch nginx -echo "starting nginx ..." -/usr/sbin/nginx -g "daemon off;" & - -nginx_pid=$! - -SECONDS=0 - -while ! ps -ef | grep "nginx: master process" | grep -v grep; do - if (( SECONDS > 5 )); then - echo "couldn't find nginx master process" - exit 1 - fi -done - -cat /etc/nginx-agent/nginx-agent.conf; - -# start nginx-agent, pass args -echo "starting nginx-agent ..." -nginx-agent "$@" & - -agent_pid=$! - -if [ $? != 0 ]; then - echo "couldn't start the agent, please check the log file" - exit 1 -fi - -wait_term() -{ - wait ${agent_pid} - trap - TERM - kill -QUIT "${nginx_pid}" 2>/dev/null - echo "waiting for nginx to stop..." - wait ${nginx_pid} -} - -wait_term - -echo "nginx-agent process has stopped, exiting." diff --git a/scripts/docker/agentless-entrypoint.sh b/test/docker/agentless-entrypoint.sh similarity index 100% rename from scripts/docker/agentless-entrypoint.sh rename to test/docker/agentless-entrypoint.sh diff --git a/scripts/docker/entrypoint.sh b/test/docker/entrypoint.sh similarity index 100% rename from scripts/docker/entrypoint.sh rename to test/docker/entrypoint.sh diff --git a/test/docker/oss/apk/Dockerfile b/test/docker/nginx-official-image/apk/Dockerfile similarity index 100% rename from test/docker/oss/apk/Dockerfile rename to test/docker/nginx-official-image/apk/Dockerfile diff --git a/test/docker/oss/deb/Dockerfile b/test/docker/nginx-official-image/deb/Dockerfile similarity index 100% rename from test/docker/oss/deb/Dockerfile rename to test/docker/nginx-official-image/deb/Dockerfile diff --git a/scripts/docker/nginx-oss/apk/Dockerfile b/test/docker/nginx-oss/apk/Dockerfile similarity index 100% rename from scripts/docker/nginx-oss/apk/Dockerfile rename to test/docker/nginx-oss/apk/Dockerfile diff --git a/scripts/docker/nginx-oss/deb/Dockerfile b/test/docker/nginx-oss/deb/Dockerfile similarity index 100% rename from scripts/docker/nginx-oss/deb/Dockerfile rename to test/docker/nginx-oss/deb/Dockerfile diff --git a/scripts/docker/nginx-oss/rpm/Dockerfile b/test/docker/nginx-oss/rpm/Dockerfile similarity index 100% rename from scripts/docker/nginx-oss/rpm/Dockerfile rename to test/docker/nginx-oss/rpm/Dockerfile diff --git a/scripts/docker/nginx-plus/almalinux/Dockerfile b/test/docker/nginx-plus/almalinux/Dockerfile similarity index 97% rename from scripts/docker/nginx-plus/almalinux/Dockerfile rename to test/docker/nginx-plus/almalinux/Dockerfile index 704a079e84..976cf65dbd 100644 --- a/scripts/docker/nginx-plus/almalinux/Dockerfile +++ b/test/docker/nginx-plus/almalinux/Dockerfile @@ -9,7 +9,7 @@ ARG OS_VERSION ARG NGINX_AGENT_VERSION WORKDIR /agent -COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh +COPY ./test/docker/entrypoint.sh /agent/entrypoint.sh COPY ./nginx-agent.conf /agent/nginx-agent.conf RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ diff --git a/scripts/docker/nginx-plus/alpine/Dockerfile b/test/docker/nginx-plus/alpine/Dockerfile similarity index 98% rename from scripts/docker/nginx-plus/alpine/Dockerfile rename to test/docker/nginx-plus/alpine/Dockerfile index 391efafe58..20b93bef9a 100644 --- a/scripts/docker/nginx-plus/alpine/Dockerfile +++ b/test/docker/nginx-plus/alpine/Dockerfile @@ -6,7 +6,7 @@ ARG PACKAGES_REPO ARG NGINX_AGENT_VERSION WORKDIR /agent -COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh +COPY ./test/docker/entrypoint.sh /agent/entrypoint.sh COPY ./nginx-agent.conf /agent/nginx-agent.conf RUN --mount=type=secret,id=nginx-crt,dst=/etc/apk/cert.pem \ diff --git a/scripts/docker/nginx-plus/amazonlinux/Dockerfile b/test/docker/nginx-plus/amazonlinux/Dockerfile similarity index 97% rename from scripts/docker/nginx-plus/amazonlinux/Dockerfile rename to test/docker/nginx-plus/amazonlinux/Dockerfile index 310cd6d3ee..3e64392b16 100644 --- a/scripts/docker/nginx-plus/amazonlinux/Dockerfile +++ b/test/docker/nginx-plus/amazonlinux/Dockerfile @@ -9,7 +9,7 @@ ARG OS_VERSION ARG NGINX_AGENT_VERSION WORKDIR /agent -COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh +COPY ./test/docker/entrypoint.sh /agent/entrypoint.sh COPY ./nginx-agent.conf /agent/nginx-agent.conf RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ diff --git a/scripts/docker/nginx-plus/centos/Dockerfile b/test/docker/nginx-plus/centos/Dockerfile similarity index 97% rename from scripts/docker/nginx-plus/centos/Dockerfile rename to test/docker/nginx-plus/centos/Dockerfile index f098839fa9..04d4c1a716 100644 --- a/scripts/docker/nginx-plus/centos/Dockerfile +++ b/test/docker/nginx-plus/centos/Dockerfile @@ -9,7 +9,7 @@ ARG OS_VERSION ARG NGINX_AGENT_VERSION WORKDIR /agent -COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh +COPY ./test/docker/entrypoint.sh /agent/entrypoint.sh COPY ./nginx-agent.conf /agent/nginx-agent.conf RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ diff --git a/scripts/docker/nginx-plus/debian/Dockerfile b/test/docker/nginx-plus/debian/Dockerfile similarity index 98% rename from scripts/docker/nginx-plus/debian/Dockerfile rename to test/docker/nginx-plus/debian/Dockerfile index 014bb206aa..e5af6f8fdb 100644 --- a/scripts/docker/nginx-plus/debian/Dockerfile +++ b/test/docker/nginx-plus/debian/Dockerfile @@ -6,7 +6,7 @@ ARG PACKAGES_REPO ARG NGINX_AGENT_VERSION WORKDIR /agent -COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh +COPY ./test/docker/entrypoint.sh /agent/entrypoint.sh COPY ./nginx-agent.conf /agent/nginx-agent.conf RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ diff --git a/scripts/docker/nginx-plus/oraclelinux/Dockerfile b/test/docker/nginx-plus/oraclelinux/Dockerfile similarity index 97% rename from scripts/docker/nginx-plus/oraclelinux/Dockerfile rename to test/docker/nginx-plus/oraclelinux/Dockerfile index 1d454e70d0..1e2cd63e81 100644 --- a/scripts/docker/nginx-plus/oraclelinux/Dockerfile +++ b/test/docker/nginx-plus/oraclelinux/Dockerfile @@ -9,7 +9,7 @@ ARG OS_VERSION ARG NGINX_AGENT_VERSION WORKDIR /agent -COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh +COPY ./test/docker/entrypoint.sh /agent/entrypoint.sh COPY ./nginx-agent.conf /agent/nginx-agent.conf RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ diff --git a/scripts/docker/nginx-plus/redhatenterprise/Dockerfile b/test/docker/nginx-plus/redhatenterprise/Dockerfile similarity index 97% rename from scripts/docker/nginx-plus/redhatenterprise/Dockerfile rename to test/docker/nginx-plus/redhatenterprise/Dockerfile index 589c681e52..d1854b44d2 100644 --- a/scripts/docker/nginx-plus/redhatenterprise/Dockerfile +++ b/test/docker/nginx-plus/redhatenterprise/Dockerfile @@ -10,7 +10,7 @@ ARG OS_VERSION ARG NGINX_AGENT_VERSION WORKDIR /agent -COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh +COPY ./test/docker/entrypoint.sh /agent/entrypoint.sh COPY ./nginx-agent.conf /agent/nginx-agent.conf RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ diff --git a/scripts/docker/nginx-plus/rockylinux/Dockerfile b/test/docker/nginx-plus/rockylinux/Dockerfile similarity index 97% rename from scripts/docker/nginx-plus/rockylinux/Dockerfile rename to test/docker/nginx-plus/rockylinux/Dockerfile index bcf6649459..573e5c6691 100644 --- a/scripts/docker/nginx-plus/rockylinux/Dockerfile +++ b/test/docker/nginx-plus/rockylinux/Dockerfile @@ -9,7 +9,7 @@ ARG OS_VERSION ARG NGINX_AGENT_VERSION WORKDIR /agent -COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh +COPY ./test/docker/entrypoint.sh /agent/entrypoint.sh COPY ./nginx-agent.conf /agent/nginx-agent.conf RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ diff --git a/scripts/docker/nginx-plus/suse/Dockerfile b/test/docker/nginx-plus/suse/Dockerfile similarity index 97% rename from scripts/docker/nginx-plus/suse/Dockerfile rename to test/docker/nginx-plus/suse/Dockerfile index 0e069cdc7d..39983a96a8 100644 --- a/scripts/docker/nginx-plus/suse/Dockerfile +++ b/test/docker/nginx-plus/suse/Dockerfile @@ -10,7 +10,7 @@ ARG PACKAGES_REPO ARG NGINX_AGENT_VERSION WORKDIR /agent -COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh +COPY ./test/docker/entrypoint.sh /agent/entrypoint.sh COPY ./nginx-agent.conf /agent/nginx-agent.conf RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ diff --git a/scripts/docker/nginx-plus/ubuntu/Dockerfile b/test/docker/nginx-plus/ubuntu/Dockerfile similarity index 98% rename from scripts/docker/nginx-plus/ubuntu/Dockerfile rename to test/docker/nginx-plus/ubuntu/Dockerfile index 7e3ef84a5a..128347acd3 100644 --- a/scripts/docker/nginx-plus/ubuntu/Dockerfile +++ b/test/docker/nginx-plus/ubuntu/Dockerfile @@ -7,7 +7,7 @@ ARG NGINX_AGENT_VERSION RUN echo $PACKAGES_REPO WORKDIR /agent -COPY ./scripts/docker/entrypoint.sh /agent/entrypoint.sh +COPY ./test/docker/entrypoint.sh /agent/entrypoint.sh COPY ./nginx-agent.conf /agent/nginx-agent.conf RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \ diff --git a/test/docker/Dockerfile b/test/docker/performance/Dockerfile similarity index 100% rename from test/docker/Dockerfile rename to test/docker/performance/Dockerfile diff --git a/test/integration/api/docker-compose-official-image.yml b/test/integration/api/docker-compose-official-image.yml index 1db62732be..fd060a2545 100644 --- a/test/integration/api/docker-compose-official-image.yml +++ b/test/integration/api/docker-compose-official-image.yml @@ -8,7 +8,7 @@ services: agent: build: context: ../../../ - dockerfile: ./test/docker/oss/${CONTAINER_OS_TYPE}/Dockerfile + dockerfile: ./test/docker/nginx-official-image/${CONTAINER_OS_TYPE}/Dockerfile target: install args: PACKAGE_NAME: ${PACKAGE_NAME} diff --git a/test/integration/api/docker-compose.yml b/test/integration/api/docker-compose.yml index 48ca3efed4..d7486e46bc 100644 --- a/test/integration/api/docker-compose.yml +++ b/test/integration/api/docker-compose.yml @@ -8,7 +8,7 @@ services: agent: build: context: ../../../ - dockerfile: ./scripts/docker/nginx-oss/${CONTAINER_OS_TYPE}/Dockerfile + dockerfile: ./test/docker/nginx-oss/${CONTAINER_OS_TYPE}/Dockerfile target: install-agent-local args: PACKAGE_NAME: ${PACKAGE_NAME} @@ -16,7 +16,7 @@ services: BASE_IMAGE: ${BASE_IMAGE} OS_RELEASE: ${OS_RELEASE} OS_VERSION: ${OS_VERSION} - ENTRY_POINT: "./scripts/docker/entrypoint.sh" + ENTRY_POINT: "./test/docker/entrypoint.sh" ports: - 9091:9091 networks: diff --git a/test/integration/features/docker-compose-official-image.yml b/test/integration/features/docker-compose-official-image.yml index 1db62732be..fd060a2545 100644 --- a/test/integration/features/docker-compose-official-image.yml +++ b/test/integration/features/docker-compose-official-image.yml @@ -8,7 +8,7 @@ services: agent: build: context: ../../../ - dockerfile: ./test/docker/oss/${CONTAINER_OS_TYPE}/Dockerfile + dockerfile: ./test/docker/nginx-official-image/${CONTAINER_OS_TYPE}/Dockerfile target: install args: PACKAGE_NAME: ${PACKAGE_NAME} diff --git a/test/integration/features/docker-compose.yml b/test/integration/features/docker-compose.yml index 94e457d482..0050fbc2f5 100644 --- a/test/integration/features/docker-compose.yml +++ b/test/integration/features/docker-compose.yml @@ -8,7 +8,7 @@ services: agent: build: context: ../../../ - dockerfile: ./scripts/docker/nginx-oss/${CONTAINER_OS_TYPE}/Dockerfile + dockerfile: ./test/docker/nginx-oss/${CONTAINER_OS_TYPE}/Dockerfile target: install-agent-local args: PACKAGE_NAME: ${PACKAGE_NAME} @@ -16,7 +16,7 @@ services: BASE_IMAGE: ${BASE_IMAGE} OS_RELEASE: ${OS_RELEASE} OS_VERSION: ${OS_VERSION} - ENTRY_POINT: "./scripts/docker/entrypoint.sh" + ENTRY_POINT: "./test/docker/entrypoint.sh" ports: - 9091:9091 networks: diff --git a/test/integration/grpc/docker-compose-official-image.yml b/test/integration/grpc/docker-compose-official-image.yml index d4f9b7b647..60acbb0389 100644 --- a/test/integration/grpc/docker-compose-official-image.yml +++ b/test/integration/grpc/docker-compose-official-image.yml @@ -4,7 +4,7 @@ services: agent: build: context: ../../../ - dockerfile: ./test/docker/oss/${CONTAINER_OS_TYPE}/Dockerfile + dockerfile: ./test/docker/nginx-official-image/${CONTAINER_OS_TYPE}/Dockerfile target: install args: PACKAGE_NAME: ${PACKAGE_NAME} diff --git a/test/integration/grpc/docker-compose.yml b/test/integration/grpc/docker-compose.yml index 95785ff8c6..dfa8a8544b 100644 --- a/test/integration/grpc/docker-compose.yml +++ b/test/integration/grpc/docker-compose.yml @@ -4,7 +4,7 @@ services: agent: build: context: ../../../ - dockerfile: ./scripts/docker/nginx-oss/${CONTAINER_OS_TYPE}/Dockerfile + dockerfile: ./test/docker/nginx-oss/${CONTAINER_OS_TYPE}/Dockerfile target: install-agent-local args: PACKAGE_NAME: ${PACKAGE_NAME} @@ -12,7 +12,7 @@ services: BASE_IMAGE: ${BASE_IMAGE} OS_RELEASE: ${OS_RELEASE} OS_VERSION: ${OS_VERSION} - ENTRY_POINT: "./scripts/docker/entrypoint.sh" + ENTRY_POINT: "./test/docker/entrypoint.sh" extra_hosts: - "host.docker.internal:host-gateway" volumes: diff --git a/test/integration/install/docker-compose.yml b/test/integration/install/docker-compose.yml index 29c83b2cb7..ca40ff273e 100644 --- a/test/integration/install/docker-compose.yml +++ b/test/integration/install/docker-compose.yml @@ -4,7 +4,7 @@ services: agent: build: context: ../../../ - dockerfile: ./scripts/docker/nginx-oss/${CONTAINER_OS_TYPE}/Dockerfile + dockerfile: ./test/docker/nginx-oss/${CONTAINER_OS_TYPE}/Dockerfile target: install-nginx args: PACKAGE_NAME: ${PACKAGE_NAME} @@ -13,7 +13,7 @@ services: BASE_IMAGE: ${BASE_IMAGE} OS_RELEASE: ${OS_RELEASE} OS_VERSION: ${OS_VERSION} - ENTRY_POINT: "./scripts/docker/agentless-entrypoint.sh" + ENTRY_POINT: "./test/docker/agentless-entrypoint.sh" ports: - 80 volumes: