From 872038af6ad0d7440257c7f9fc0b021e61f7e078 Mon Sep 17 00:00:00 2001 From: Mohamed EL Habib Date: Mon, 14 Dec 2020 00:09:01 +0100 Subject: [PATCH 01/13] Bump the version of nodejs and of ajv-cli to fix security vuls reported by trivy --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5000842..58487ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM node:8-alpine +FROM node:15.4.0-alpine3.12 -ARG AJV_CLI_VERSION=3.2.1 -RUN npm install -g ajv-cli@${AJV_CLI_VERSION} +ARG AJV_CLI_VERSION=3.3.0 +RUN apk add libcrypto1.1=1.1.1i-r0 libssl1.1=1.1.1i-r0 && npm install -g ajv-cli@${AJV_CLI_VERSION} VOLUME ["/data"] WORKDIR "/data" From 9ecc13c69fd7cc23d391dedae351885a4ccf99e9 Mon Sep 17 00:00:00 2001 From: Mohamed EL Habib Date: Mon, 1 Feb 2021 21:17:34 +0100 Subject: [PATCH 02/13] Bump to ajv-cli 4.0.1 and parent image to 15.5-alpine3.12 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 58487ba..3a99644 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM node:15.4.0-alpine3.12 +FROM node:15.5-alpine3.12 -ARG AJV_CLI_VERSION=3.3.0 +ARG AJV_CLI_VERSION=4.0.1 RUN apk add libcrypto1.1=1.1.1i-r0 libssl1.1=1.1.1i-r0 && npm install -g ajv-cli@${AJV_CLI_VERSION} VOLUME ["/data"] From de913d178eb883bc82aae8ec40df384f1a317fdb Mon Sep 17 00:00:00 2001 From: Mohamed EL Habib Date: Fri, 12 Mar 2021 09:56:02 +0100 Subject: [PATCH 03/13] upgrade base image and ajv-cli versions --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3a99644..faf0d60 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM node:15.5-alpine3.12 +FROM node:15.11-alpine3.13 -ARG AJV_CLI_VERSION=4.0.1 -RUN apk add libcrypto1.1=1.1.1i-r0 libssl1.1=1.1.1i-r0 && npm install -g ajv-cli@${AJV_CLI_VERSION} +ARG AJV_CLI_VERSION=4.2.0 +RUN apk add libcrypto1.1 libssl1.1 && npm install -g ajv-cli@${AJV_CLI_VERSION} VOLUME ["/data"] WORKDIR "/data" From 5b74fc9f68232a297ea98dd8a1695e9f9659454b Mon Sep 17 00:00:00 2001 From: Mohamed EL Habib Date: Sun, 30 May 2021 05:00:34 +0200 Subject: [PATCH 04/13] upgrade base image node to 16.2 and ajv-cli to 5.0.0 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index faf0d60..072ae74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM node:15.11-alpine3.13 +FROM node:16.2.0-alpine3.13 -ARG AJV_CLI_VERSION=4.2.0 +ARG AJV_CLI_VERSION=5.0.0 RUN apk add libcrypto1.1 libssl1.1 && npm install -g ajv-cli@${AJV_CLI_VERSION} VOLUME ["/data"] From 43c343719ce4eb3efbd9bf5d03d43aaefae08ff7 Mon Sep 17 00:00:00 2001 From: Mohamed EL Habib Date: Sun, 12 Sep 2021 03:20:07 +0200 Subject: [PATCH 05/13] upgrade from image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 072ae74..375a07b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16.2.0-alpine3.13 +FROM node:16.9-alpine3.14 ARG AJV_CLI_VERSION=5.0.0 RUN apk add libcrypto1.1 libssl1.1 && npm install -g ajv-cli@${AJV_CLI_VERSION} From 429749eef71460d4f4ad9db17f02b523d64993da Mon Sep 17 00:00:00 2001 From: Mohamed EL Habib Date: Sun, 12 Sep 2021 03:20:54 +0200 Subject: [PATCH 06/13] upgrade ajv-cli version and add ajv-formats --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 375a07b..7d71e22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,12 @@ FROM node:16.9-alpine3.14 ARG AJV_CLI_VERSION=5.0.0 -RUN apk add libcrypto1.1 libssl1.1 && npm install -g ajv-cli@${AJV_CLI_VERSION} - +ARG AJV_FORMATS_VERSION=2.1.1 +RUN apk add libcrypto1.1 libssl1.1 \ + && npm install -g npm@7.23.0 \ + && npm --version \ + && npm install -g ajv-cli@${AJV_CLI_VERSION} \ + && npm install -g ajv-formats@${AJV_FORMATS_VERSION} VOLUME ["/data"] WORKDIR "/data" From 3c105cc6bcd2bcaa39b381183caff64f183c07ff Mon Sep 17 00:00:00 2001 From: Mohamed EL-Habib Date: Mon, 30 Sep 2024 04:25:45 +0200 Subject: [PATCH 07/13] upgrade node and ajv-formats versions --- Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7d71e22..d0bc6a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,8 @@ -FROM node:16.9-alpine3.14 +FROM node:22.9.0-alpine3.20 ARG AJV_CLI_VERSION=5.0.0 -ARG AJV_FORMATS_VERSION=2.1.1 -RUN apk add libcrypto1.1 libssl1.1 \ - && npm install -g npm@7.23.0 \ - && npm --version \ - && npm install -g ajv-cli@${AJV_CLI_VERSION} \ +ARG AJV_FORMATS_VERSION=3.0.1 +RUN npm install -g ajv-cli@${AJV_CLI_VERSION} \ && npm install -g ajv-formats@${AJV_FORMATS_VERSION} VOLUME ["/data"] WORKDIR "/data" From 6db690c76ca1f0af76b12a096e7951494f146a6c Mon Sep 17 00:00:00 2001 From: Mohamed EL-Habib Date: Mon, 30 Sep 2024 05:18:50 +0200 Subject: [PATCH 08/13] added github action --- .github/workflows/docker-build.yml | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/docker-build.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..d9b9709 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,36 @@ +name: Docker Build and Test + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + # add docker hub secrets + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: "mohamedelhabib" + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Build Docker image + # build the image with the Dockerfile in the current directory and tag it with the git tag + run: docker build . --file Dockerfile --tag mohamedelhabib/docker-ajv:$GITHUB_REF_SLUG From 7c6d34e50ddc50838239bbffe65deb04c198a432 Mon Sep 17 00:00:00 2001 From: Mohamed EL-Habib Date: Mon, 30 Sep 2024 05:27:49 +0200 Subject: [PATCH 09/13] added github action --- .github/workflows/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index d9b9709..36aea71 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -33,4 +33,4 @@ jobs: - name: Build Docker image # build the image with the Dockerfile in the current directory and tag it with the git tag - run: docker build . --file Dockerfile --tag mohamedelhabib/docker-ajv:$GITHUB_REF_SLUG + run: docker build . --file Dockerfile --tag mohamedelhabib/docker-ajv:${{ env.GITHUB_REF_SLUG }} From 929e793c142a5e4f7a5273d281770c9e621b481c Mon Sep 17 00:00:00 2001 From: Mohamed EL-Habib Date: Mon, 30 Sep 2024 05:37:25 +0200 Subject: [PATCH 10/13] added github action --- .github/workflows/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 36aea71..e190fa7 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -33,4 +33,4 @@ jobs: - name: Build Docker image # build the image with the Dockerfile in the current directory and tag it with the git tag - run: docker build . --file Dockerfile --tag mohamedelhabib/docker-ajv:${{ env.GITHUB_REF_SLUG }} + run: docker build . --file Dockerfile --tag mohamedelhabib/docker-ajv:$GITHUB_REF_NAME From 594518348ea0d8ec2d7072e82ba0e75ef9909abb Mon Sep 17 00:00:00 2001 From: Mohamed EL-Habib Date: Mon, 30 Sep 2024 05:39:59 +0200 Subject: [PATCH 11/13] added github action --- .github/workflows/docker-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e190fa7..3e6bbd6 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -34,3 +34,5 @@ jobs: - name: Build Docker image # build the image with the Dockerfile in the current directory and tag it with the git tag run: docker build . --file Dockerfile --tag mohamedelhabib/docker-ajv:$GITHUB_REF_NAME + - name: Push Docker image + run: docker push mohamedelhabib/docker-ajv:$GITHUB_REF_NAME From f8a1c77b990ce458975381df1f8ad34671ab2038 Mon Sep 17 00:00:00 2001 From: Mohamed EL-Habib Date: Tue, 22 Jul 2025 15:34:56 +0200 Subject: [PATCH 12/13] upgrade base image version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d0bc6a6..baee2b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:22.9.0-alpine3.20 +FROM node:24.4.1-alpine3.22 ARG AJV_CLI_VERSION=5.0.0 ARG AJV_FORMATS_VERSION=3.0.1 From ef48040621b77ed4639e0c781c242931e7f456a1 Mon Sep 17 00:00:00 2001 From: Mohamed EL-Habib Date: Tue, 22 Jul 2025 17:53:18 +0200 Subject: [PATCH 13/13] upgrade base image version --- .github/workflows/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 3e6bbd6..bb5a882 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }}