Skip to content

Commit

Permalink
change base image tag length
Browse files Browse the repository at this point in the history
  • Loading branch information
oseoin committed Jan 29, 2024
1 parent bb6f86f commit 3f95939
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/data/matrix-smoke.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
},
{
"label": "AP_WAF 2/4",
"image": "alpine-plus-nap-waf-fips",
"image": "alpine-plus-nap-fips",
"marker": "'appprotect_waf_policies and not appprotect_waf_policies_allow'"
},
{
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-base-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ jobs:
- name: Output Variables
id: vars
run: |
echo docker_md5=$(find . -type f \( -name "build/Dockerfile" -o -name .github/data/version.txt \) -not -path "./docs*" -exec md5sum {} + | LC_ALL=C sort | md5sum | awk '{ print $1 }') >> $GITHUB_OUTPUT
docker_md5=$(find . -type f \( -name "build/Dockerfile" -o -name .github/data/version.txt \) -not -path "./docs*" -exec md5sum {} + | LC_ALL=C sort | md5sum | awk '{ print $1 }' | )
echo "docker_md5=${docker_md5:0:8}" >> $GITHUB_OUTPUT
source .github/data/version.txt
echo "ic_version=${IC_VERSION}" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
Expand Down Expand Up @@ -196,7 +197,7 @@ jobs:
- image: ubi-8-plus-nap
platforms: "linux/amd64"
nap_modules: "waf,dos"
- image: alpine-plus-nap-waf-fips
- image: alpine-plus-nap-fips
platforms: "linux/amd64"
nap_modules: waf
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ jobs:
target: aws
platforms: "linux/amd64"
nap_modules: "waf,dos"
- image: alpine-plus-nap-waf-fips
- image: alpine-plus-nap-fips
target: goreleaser
platforms: "linux/amd64"
nap_modules: waf
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ TARGET ?= local ## The target of the build. Possible valu
override DOCKER_BUILD_OPTIONS += --build-arg IC_VERSION=$(VERSION) ## The options for the docker build command. For example, --pull
ARCH ?= amd64 ## The architecture of the image or binary. For example: amd64, arm64, ppc64le, s390x. Not all architectures are supported for all targets
GOOS ?= linux ## The OS of the binary. For example linux, darwin
BASE_IMG ?= nginx/nginx-ingress:edge ## The tag of the image. For example, 2.0.0

# final docker build command
DOCKER_CMD = docker build --platform linux/$(strip $(ARCH)) $(strip $(DOCKER_BUILD_OPTIONS)) --target $(strip $(TARGET)) -f build/Dockerfile -t $(strip $(PREFIX)):$(strip $(TAG)) .
Expand Down Expand Up @@ -124,12 +125,16 @@ alpine-image-plus-fips: build ## Create Docker image for Ingress Controller (Alp

.PHONY: alpine-image-nap-plus-fips
alpine-image-nap-plus-fips: build ## Create Docker image for Ingress Controller (Alpine with NGINX Plus, NGINX App Protect WAF and FIPS)
$(DOCKER_CMD) $(PLUS_ARGS) --build-arg BUILD_OS=alpine-plus-nap-waf-fips
$(DOCKER_CMD) $(PLUS_ARGS) --build-arg BUILD_OS=alpine-plus-nap-fips

.PHONY: debian-image-plus
debian-image-plus: build ## Create Docker image for Ingress Controller (Debian with NGINX Plus)
$(DOCKER_CMD) $(PLUS_ARGS) --build-arg BUILD_OS=debian-plus

.PHONY: prebuilt-image
prebuilt-image: build ## Create Docker image for Ingress Controller (Debian with NGINX Plus)
$(DOCKER_CMD) $(PLUS_ARGS) --build-arg BASE_IMG=${BASE_IMG}

.PHONY: debian-image-nap-plus
debian-image-nap-plus: build ## Create Docker image for Ingress Controller (Debian with NGINX Plus and NGINX App Protect WAF)
$(DOCKER_CMD) $(PLUS_ARGS) --build-arg BUILD_OS=debian-plus-nap --build-arg NAP_MODULES=waf
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ RUN --mount=type=bind,from=alpine-fips-3.19,target=/tmp/fips/ \


############################################# Base image for Alpine with NGINX Plus, App Protect WAF and FIPS #############################################
FROM alpine:3.17@sha256:6e94b5cda2d6fd57d85abf81e81dabaea97a5885f919da676cc19d3551da4061 as alpine-plus-nap-waf-fips
FROM alpine:3.17@sha256:6e94b5cda2d6fd57d85abf81e81dabaea97a5885f919da676cc19d3551da4061 as alpine-plus-nap-fips
ARG NGINX_PLUS_VERSION

RUN --mount=type=bind,from=alpine-fips-3.17,target=/tmp/fips/ \
Expand Down

0 comments on commit 3f95939

Please sign in to comment.