Skip to content

Commit

Permalink
Refactor labels
Browse files Browse the repository at this point in the history
  • Loading branch information
nedvna committed Nov 29, 2023
1 parent aaab300 commit 547dbf8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ ARG ALPINE_VERSION
ARG NGINX_VERSION

MAINTAINER Wallarm Support Team <[email protected]>
LABEL NGINX_VERSION=${NGINX_VERSION}
LABEL AIO_VERSION=${AIO_VERSION}

LABEL org.opencontainers.image.title="Docker official image for Wallarm Node. API security platform agent"
LABEL org.opencontainers.image.documentation="https://docs.wallarm.com/installation/inline/compute-instances/docker/nginx-based"
LABEL org.opencontainers.image.source="https://github.com/wallarm/docker-wallarm-node"
LABEL org.opencontainers.image.vendor="Wallarm"
LABEL org.opencontainers.image.version="${AIO_VERSION}"
LABEL org.opencontainers.image.revision="${CONTAINER_VERSION}"
LABEL com.wallarm.docker.versions.alpine-version="${ALPINE_VERSION}"
LABEL com.wallarm.docker.versions.nginx-version="${NGINX_VERSION}"

# core deps
RUN addgroup -S wallarm && \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ endif
.PHONY: build
build: setup_buildx
$(foreach ARCH,$(ARCHS), ARCH=$(ARCH) build-scripts/get_dependencies.sh && ARCH=$(ARCH) build-scripts/apply_fixes.sh ;)
docker buildx build --platform $(PLATFORMS) -f Dockerfile --build-arg ALPINE_VERSION="$(ALPINE_VERSION)" --build-arg NGINX_VERSION="$(NGINX_VERSION)" --build-arg AIO_VERSION="$(AIO_VERSION)" --build-arg WLRM_FOLDER="$(WLRM_FOLDER)" -t $(IMAGE) $(BUILDX_ARGS) .
docker buildx build --platform $(PLATFORMS) -f Dockerfile --build-arg CONTAINER_VERSION="$(CONTAINER_VERSION)" --build-arg ALPINE_VERSION="$(ALPINE_VERSION)" --build-arg NGINX_VERSION="$(NGINX_VERSION)" --build-arg AIO_VERSION="$(AIO_VERSION)" --build-arg WLRM_FOLDER="$(WLRM_FOLDER)" -t $(IMAGE) $(BUILDX_ARGS) .

setup_buildx:
docker buildx rm multi-arch || true
Expand Down
6 changes: 3 additions & 3 deletions build-scripts/apply_fixes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ fi

BUILD_DIR="build/linux/${DOCKER_ARCH}"

sed -i \
-e '/WALLARM_COMPONENT_NAME/d' \
-e '/WALLARM_COMPONENT_VERSION/d' \
sed -i -E \
-e '/WALLARM_COMPONENT_NAME/s/(.*)=(.*)/\1=wallarm_nginx_docker/' \
-e "/WALLARM_COMPONENT_VERSION/s/(.*)=(.*)/\1=$AIO_VERSION/" \
-e '/SLAB_ALLOC_ARENA/d' \
"$BUILD_DIR/opt/wallarm/env.list"

Expand Down

0 comments on commit 547dbf8

Please sign in to comment.