Skip to content

Commit

Permalink
remove official images, move testing images
Browse files Browse the repository at this point in the history
  • Loading branch information
aphralG committed Sep 12, 2024
1 parent 2ec1e31 commit 0204c74
Show file tree
Hide file tree
Showing 35 changed files with 28 additions and 301 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,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
Expand Down
32 changes: 4 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand All @@ -299,44 +299,20 @@ 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} \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
--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 #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Expand Down
4 changes: 2 additions & 2 deletions examples/grafana-metrics/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Loading

0 comments on commit 0204c74

Please sign in to comment.