From 69aad8e8918b988755bbac534f5be6fc7161bee9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 31 Jan 2019 04:45:49 +0000 Subject: [PATCH 01/29] Bump alpine from 3.8 to 3.9 Bumps alpine from 3.8 to 3.9. Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0040c34..5f16566 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.8 +FROM alpine:3.9 MAINTAINER Jochen Schalanda ENV PROSODY_VERSION 0.10.2-r0 From b5c73b979e31654cd2d2bd3a01a9353263090a49 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Fri, 8 Feb 2019 00:36:47 -0500 Subject: [PATCH 02/29] Update to use latest alpine prosody release --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5f16566..a625fcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.9 MAINTAINER Jochen Schalanda -ENV PROSODY_VERSION 0.10.2-r0 +ENV PROSODY_VERSION 0.10.2-r2 # Build-time metadata as defined at http://label-schema.org ARG BUILD_DATE From 682af5c1c6fa72301c4b7b0ae73f061477551492 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2019 11:07:29 +0200 Subject: [PATCH 03/29] Bump alpine from 3.9 to 3.10.0 (#5) Bumps alpine from 3.9 to 3.10.0. Signed-off-by: dependabot-preview[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a625fcf..ef005b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.9 +FROM alpine:3.10.0 MAINTAINER Jochen Schalanda ENV PROSODY_VERSION 0.10.2-r2 From ea94828447eec9f6b34da332caefa41b9295642a Mon Sep 17 00:00:00 2001 From: Jochen Schalanda Date: Thu, 27 Jun 2019 11:09:23 +0200 Subject: [PATCH 04/29] Update to Prosody 0.11.2-r0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ef005b9..5f813cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.10.0 MAINTAINER Jochen Schalanda -ENV PROSODY_VERSION 0.10.2-r2 +ENV PROSODY_VERSION 0.11.2-r0 # Build-time metadata as defined at http://label-schema.org ARG BUILD_DATE From d58ef69d92cd82ffaff5b52bf8480f1e0dea0329 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2019 09:36:48 +0200 Subject: [PATCH 05/29] Bump alpine from 3.10.0 to 3.10.1 (#6) Bumps alpine from 3.10.0 to 3.10.1. Signed-off-by: dependabot-preview[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5f813cf..d0ce605 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.10.0 +FROM alpine:3.10.1 MAINTAINER Jochen Schalanda ENV PROSODY_VERSION 0.11.2-r0 From bf7a0faff6efe545c21ee12e35933b634e5700bb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2019 08:52:27 +0200 Subject: [PATCH 06/29] Bump alpine from 3.10.1 to 3.10.2 (#7) Bumps alpine from 3.10.1 to 3.10.2. Signed-off-by: dependabot-preview[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d0ce605..43d96f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.10.1 +FROM alpine:3.10.2 MAINTAINER Jochen Schalanda ENV PROSODY_VERSION 0.11.2-r0 From e79a709db0b56712d8ad30fb3282bcaf303a7bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 12 Sep 2020 11:47:25 +0200 Subject: [PATCH 07/29] initial ci config --- .gitlab-ci.yml | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..985ea05 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,77 @@ +# This is a GitLab CI configuration to build the project as a docker image +# The file is generic enough to be dropped in a project containing a working Dockerfile +# Author: Florent CHAUVEAU +# Mentioned here: https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/ + +# do not use "latest" here, if you want this to work in the future +image: docker:19 + +variables: + DOCKER_DRIVER: overlay + DOCKER_TLS_CERTDIR: "" + +stages: + - build + - push + +# Use this if your GitLab runner does not use socket binding +services: + - docker:19-dind + +before_script: + # docker login asks for the password to be passed through stdin for security + # we use $CI_JOB_TOKEN here which is a special token provided by GitLab + - echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY + +Build: + stage: build + script: + # fetches the latest image (not failing if image is not found) + - docker pull $CI_REGISTRY_IMAGE:latest || true + # builds the project, passing proxy variables, and vcs vars for LABEL + # notice the cache-from, which is going to use the image we just pulled locally + # the built image is tagged locally with the commit SHA, and then pushed to + # the GitLab registry + - > + docker build + --pull + --build-arg VCS_REF=$CI_COMMIT_SHA + --build-arg VCS_URL=$CI_PROJECT_URL + --cache-from $CI_REGISTRY_IMAGE:latest + --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + . + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + +# Here, the goal is to tag the "main" branch as "latest" +Push latest: + variables: + # We are just playing with Docker here. + # We do not need GitLab to clone the source code. + GIT_STRATEGY: none + stage: push + only: + # Only "main" should be tagged "latest" + - main + script: + # Because we have no guarantee that this job will be picked up by the same runner + # that built the image in the previous step, we pull it again locally + - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + # Then we tag it "latest" + - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:latest + # Annnd we push it. + - docker push $CI_REGISTRY_IMAGE:latest + +# Finally, the goal here is to Docker tag any Git tag +# GitLab will start a new pipeline everytime a Git tag is created, which is pretty awesome +Push tag: + variables: + # Again, we do not need the source code here. Just playing with Docker. + GIT_STRATEGY: none + stage: push + only: + # We want this job to be run on tags only. + - tags + script: + - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME From 3146b8cf4a23c5e138082859584c7023af1ab389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 12 Sep 2020 11:57:44 +0200 Subject: [PATCH 08/29] initial ci config --- .gitlab-ci.yml | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..985ea05 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,77 @@ +# This is a GitLab CI configuration to build the project as a docker image +# The file is generic enough to be dropped in a project containing a working Dockerfile +# Author: Florent CHAUVEAU +# Mentioned here: https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/ + +# do not use "latest" here, if you want this to work in the future +image: docker:19 + +variables: + DOCKER_DRIVER: overlay + DOCKER_TLS_CERTDIR: "" + +stages: + - build + - push + +# Use this if your GitLab runner does not use socket binding +services: + - docker:19-dind + +before_script: + # docker login asks for the password to be passed through stdin for security + # we use $CI_JOB_TOKEN here which is a special token provided by GitLab + - echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY + +Build: + stage: build + script: + # fetches the latest image (not failing if image is not found) + - docker pull $CI_REGISTRY_IMAGE:latest || true + # builds the project, passing proxy variables, and vcs vars for LABEL + # notice the cache-from, which is going to use the image we just pulled locally + # the built image is tagged locally with the commit SHA, and then pushed to + # the GitLab registry + - > + docker build + --pull + --build-arg VCS_REF=$CI_COMMIT_SHA + --build-arg VCS_URL=$CI_PROJECT_URL + --cache-from $CI_REGISTRY_IMAGE:latest + --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + . + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + +# Here, the goal is to tag the "main" branch as "latest" +Push latest: + variables: + # We are just playing with Docker here. + # We do not need GitLab to clone the source code. + GIT_STRATEGY: none + stage: push + only: + # Only "main" should be tagged "latest" + - main + script: + # Because we have no guarantee that this job will be picked up by the same runner + # that built the image in the previous step, we pull it again locally + - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + # Then we tag it "latest" + - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:latest + # Annnd we push it. + - docker push $CI_REGISTRY_IMAGE:latest + +# Finally, the goal here is to Docker tag any Git tag +# GitLab will start a new pipeline everytime a Git tag is created, which is pretty awesome +Push tag: + variables: + # Again, we do not need the source code here. Just playing with Docker. + GIT_STRATEGY: none + stage: push + only: + # We want this job to be run on tags only. + - tags + script: + - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME From e1cb12e555d5030e294035123657ac5cf70027a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 12 Sep 2020 12:03:06 +0200 Subject: [PATCH 09/29] switched to alpine 3.12 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 43d96f7..c7d96d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.10.2 +FROM alpine:3.12 MAINTAINER Jochen Schalanda ENV PROSODY_VERSION 0.11.2-r0 From c21a87e34dab03b084ca4d3d891075b3084ba090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 12 Sep 2020 12:03:38 +0200 Subject: [PATCH 10/29] switched to prosody 0.11.5-r0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c7d96d5..6feb7b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.12 MAINTAINER Jochen Schalanda -ENV PROSODY_VERSION 0.11.2-r0 +ENV PROSODY_VERSION 0.11.5-r0 # Build-time metadata as defined at http://label-schema.org ARG BUILD_DATE From 43b2f2da194bc08142a0e0e65c0ed0fa8d163727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 12 Sep 2020 12:04:46 +0200 Subject: [PATCH 11/29] changed maintainer in Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6feb7b0..77ea739 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM alpine:3.12 -MAINTAINER Jochen Schalanda +MAINTAINER Micha Gläß-Stöcker ENV PROSODY_VERSION 0.11.5-r0 From f427d472ea2115c88d8a38ae57de8ce72fd716d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 12 Sep 2020 12:07:17 +0200 Subject: [PATCH 12/29] don't specify a prosody version anymore, always use the latest and greates available in the alpine repos --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 77ea739..7bbbade 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,6 @@ FROM alpine:3.12 MAINTAINER Micha Gläß-Stöcker -ENV PROSODY_VERSION 0.11.5-r0 - # Build-time metadata as defined at http://label-schema.org ARG BUILD_DATE ARG VCS_REF @@ -19,7 +17,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ com.microscaling.docker.dockerfile="/Dockerfile" \ com.microscaling.license="MIT" -RUN apk add --no-cache bash "prosody=${PROSODY_VERSION}" +RUN apk add --no-cache bash "prosody" RUN mkdir -p /etc/prosody/conf.d /usr/local/lib/prosody/modules COPY prosody.cfg.lua /etc/prosody/prosody.cfg.lua From 47d9a72e43bd1974bff2c85799bb0584fff66db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 12 Sep 2020 20:58:35 +0200 Subject: [PATCH 13/29] multiplatform building with buildx, not real image tagging anymore for the moment - sadly --- .gitlab-ci.yml | 102 +++++++++++++++++-------------------------------- 1 file changed, 35 insertions(+), 67 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 985ea05..9b3f18e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,77 +1,45 @@ -# This is a GitLab CI configuration to build the project as a docker image -# The file is generic enough to be dropped in a project containing a working Dockerfile -# Author: Florent CHAUVEAU -# Mentioned here: https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/ - -# do not use "latest" here, if you want this to work in the future image: docker:19 - +services: + - docker:19-dind variables: DOCKER_DRIVER: overlay DOCKER_TLS_CERTDIR: "" - stages: - - build - - push + - buildx + - deploy -# Use this if your GitLab runner does not use socket binding -services: - - docker:19-dind - -before_script: - # docker login asks for the password to be passed through stdin for security - # we use $CI_JOB_TOKEN here which is a special token provided by GitLab - - echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY - -Build: - stage: build - script: - # fetches the latest image (not failing if image is not found) - - docker pull $CI_REGISTRY_IMAGE:latest || true - # builds the project, passing proxy variables, and vcs vars for LABEL - # notice the cache-from, which is going to use the image we just pulled locally - # the built image is tagged locally with the commit SHA, and then pushed to - # the GitLab registry - - > - docker build - --pull - --build-arg VCS_REF=$CI_COMMIT_SHA - --build-arg VCS_URL=$CI_PROJECT_URL - --cache-from $CI_REGISTRY_IMAGE:latest - --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - . - - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - -# Here, the goal is to tag the "main" branch as "latest" -Push latest: +buildx: + image: docker:19-git + stage: buildx variables: - # We are just playing with Docker here. - # We do not need GitLab to clone the source code. GIT_STRATEGY: none - stage: push - only: - # Only "main" should be tagged "latest" - - main + artifacts: + paths: + - buildx + expire_in: 1 hour + services: + - docker:19-dind script: - # Because we have no guarantee that this job will be picked up by the same runner - # that built the image in the previous step, we pull it again locally - - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - # Then we tag it "latest" - - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:latest - # Annnd we push it. + - export DOCKER_BUILDKIT=1 + - git clone git://github.com/docker/buildx ./docker-buildx + - docker build --platform=local -o . ./docker-buildx + +deploy: + image: docker:19 + stage: deploy + services: + - name: docker:19-dind + command: ["--experimental"] + before_script: + - mkdir -p ~/.docker/cli-plugins + - mv buildx ~/.docker/cli-plugins/docker-buildx + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + variables: + IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG + script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker buildx create --use --name mybuilder + - docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t $IMAGE_TAG . + - docker pull $IMAGE_TAG + - docker tag $IMAGE_TAG $CI_REGISTRY_IMAGE:latest - docker push $CI_REGISTRY_IMAGE:latest - -# Finally, the goal here is to Docker tag any Git tag -# GitLab will start a new pipeline everytime a Git tag is created, which is pretty awesome -Push tag: - variables: - # Again, we do not need the source code here. Just playing with Docker. - GIT_STRATEGY: none - stage: push - only: - # We want this job to be run on tags only. - - tags - script: - - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME From 8d462cf78b1c2ca2d64dd57e44c4f9d70a39561c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 12 Sep 2020 21:02:49 +0200 Subject: [PATCH 14/29] maybe we have some image tagging now! --- .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b3f18e..3b49c9b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,8 @@ variables: DOCKER_TLS_CERTDIR: "" stages: - buildx - - deploy + - build + - push buildx: image: docker:19-git @@ -24,9 +25,9 @@ buildx: - git clone git://github.com/docker/buildx ./docker-buildx - docker build --platform=local -o . ./docker-buildx -deploy: +build: image: docker:19 - stage: deploy + stage: build services: - name: docker:19-dind command: ["--experimental"] @@ -35,11 +36,41 @@ deploy: - mv buildx ~/.docker/cli-plugins/docker-buildx - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes variables: - IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG + IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker buildx create --use --name mybuilder - docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t $IMAGE_TAG . - - docker pull $IMAGE_TAG - - docker tag $IMAGE_TAG $CI_REGISTRY_IMAGE:latest + +Push latest: + variables: + # We are just playing with Docker here. + # We do not need GitLab to clone the source code. + GIT_STRATEGY: none + stage: push + only: + # Only "main" should be tagged "latest" + - main + script: + # Because we have no guarantee that this job will be picked up by the same runner + # that built the image in the previous step, we pull it again locally + - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + # Then we tag it "latest" + - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:latest + # Annnd we push it. - docker push $CI_REGISTRY_IMAGE:latest + +# Finally, the goal here is to Docker tag any Git tag +# GitLab will start a new pipeline everytime a Git tag is created, which is pretty awesome +Push tag: + variables: + # Again, we do not need the source code here. Just playing with Docker. + GIT_STRATEGY: none + stage: push + only: + # We want this job to be run on tags only. + - tags + script: + - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME From 9820641a36e849907da7f4608a8f6c44cbd01eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 12 Sep 2020 21:12:22 +0200 Subject: [PATCH 15/29] i think we need to login to pull and push from and to our private registry --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3b49c9b..3bbf161 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,6 +52,7 @@ Push latest: # Only "main" should be tagged "latest" - main script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY # Because we have no guarantee that this job will be picked up by the same runner # that built the image in the previous step, we pull it again locally - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME @@ -71,6 +72,7 @@ Push tag: # We want this job to be run on tags only. - tags script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME From 1d75f246c32f70c54d43715b80db1c5bc6c20436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 12 Sep 2020 21:27:28 +0200 Subject: [PATCH 16/29] added --platform switch to pull, tag and push in push-latest job --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3bbf161..0f6f74a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,11 +55,11 @@ Push latest: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY # Because we have no guarantee that this job will be picked up by the same runner # that built the image in the previous step, we pull it again locally - - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + - docker pull --platform linux/amd64,linux/arm64,linux/arm/v7 $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME # Then we tag it "latest" - - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:latest + - docker tag --platform linux/amd64,linux/arm64,linux/arm/v7 $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:latest # Annnd we push it. - - docker push $CI_REGISTRY_IMAGE:latest + - docker push --platform linux/amd64,linux/arm64,linux/arm/v7 $CI_REGISTRY_IMAGE:latest # Finally, the goal here is to Docker tag any Git tag # GitLab will start a new pipeline everytime a Git tag is created, which is pretty awesome From e6d77c4e277cfc8c17f1fcd08c0303aba0761001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 12 Sep 2020 21:31:53 +0200 Subject: [PATCH 17/29] added explicit service and added experimental flag to the push latest job --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0f6f74a..0cb237b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,6 +43,9 @@ build: - docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t $IMAGE_TAG . Push latest: + services: + - name: docker:19-dind + command: ["--experimental"] variables: # We are just playing with Docker here. # We do not need GitLab to clone the source code. From 147c416d269df556d92e57d6a495b7b4a119ce1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Fri, 25 Sep 2020 09:07:38 +0200 Subject: [PATCH 18/29] changed to the current one-stage default ci config --- .gitlab-ci.yml | 62 +++++++++++--------------------------------------- 1 file changed, 13 insertions(+), 49 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0cb237b..798243b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,15 @@ -image: docker:19 +image: docker:19.03 services: - - docker:19-dind + - docker:19.03-dind variables: DOCKER_DRIVER: overlay DOCKER_TLS_CERTDIR: "" stages: - buildx - - build - - push + - deploy buildx: - image: docker:19-git + image: docker:19.03-git stage: buildx variables: GIT_STRATEGY: none @@ -19,63 +18,28 @@ buildx: - buildx expire_in: 1 hour services: - - docker:19-dind + - docker:19.03-dind script: - export DOCKER_BUILDKIT=1 - git clone git://github.com/docker/buildx ./docker-buildx - docker build --platform=local -o . ./docker-buildx -build: - image: docker:19 - stage: build +deploy: + image: docker:19.03 + stage: deploy services: - - name: docker:19-dind + - name: docker:19.03-dind command: ["--experimental"] before_script: - mkdir -p ~/.docker/cli-plugins - mv buildx ~/.docker/cli-plugins/docker-buildx - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes variables: - IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker buildx create --use --name mybuilder - docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t $IMAGE_TAG . - -Push latest: - services: - - name: docker:19-dind - command: ["--experimental"] - variables: - # We are just playing with Docker here. - # We do not need GitLab to clone the source code. - GIT_STRATEGY: none - stage: push - only: - # Only "main" should be tagged "latest" - - main - script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - # Because we have no guarantee that this job will be picked up by the same runner - # that built the image in the previous step, we pull it again locally - - docker pull --platform linux/amd64,linux/arm64,linux/arm/v7 $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - # Then we tag it "latest" - - docker tag --platform linux/amd64,linux/arm64,linux/arm/v7 $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:latest - # Annnd we push it. - - docker push --platform linux/amd64,linux/arm64,linux/arm/v7 $CI_REGISTRY_IMAGE:latest - -# Finally, the goal here is to Docker tag any Git tag -# GitLab will start a new pipeline everytime a Git tag is created, which is pretty awesome -Push tag: - variables: - # Again, we do not need the source code here. Just playing with Docker. - GIT_STRATEGY: none - stage: push - only: - # We want this job to be run on tags only. - - tags - script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + - docker pull $IMAGE_TAG + - docker tag $IMAGE_TAG $CI_REGISTRY_IMAGE:latest + - docker push $CI_REGISTRY_IMAGE:latest From 204799632f56db34a6da8c69c8f9761ef7f2213c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Tue, 13 Oct 2020 21:34:00 +0200 Subject: [PATCH 19/29] we need lua5.2-ldap --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7bbbade..67bce18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ com.microscaling.docker.dockerfile="/Dockerfile" \ com.microscaling.license="MIT" -RUN apk add --no-cache bash "prosody" +RUN apk add --no-cache bash "prosody" lua5.2-ldap RUN mkdir -p /etc/prosody/conf.d /usr/local/lib/prosody/modules COPY prosody.cfg.lua /etc/prosody/prosody.cfg.lua From 988cd03b37828291f9435725a7296e9edd9d3dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Sat, 8 May 2021 01:08:17 +0200 Subject: [PATCH 20/29] switched to alpine 3.13 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 67bce18..89ba3c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.12 +FROM alpine:3.13 MAINTAINER Micha Gläß-Stöcker # Build-time metadata as defined at http://label-schema.org From b3e399e93c2305dfbd1054757a63b12a497ba77c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Wed, 9 Jun 2021 13:42:25 +0200 Subject: [PATCH 21/29] new single-stage multiarch ci --- .gitlab-ci.yml | 41 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 798243b..46efcda 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,39 +1,16 @@ -image: docker:19.03 -services: - - docker:19.03-dind +image: registry.gitlab.tictex.eu/docker/docker-with-buildx-git:latest + variables: - DOCKER_DRIVER: overlay + DOCKER_HOST: tcp://docker:2375/ + DOCKER_DRIVER: overlay2 DOCKER_TLS_CERTDIR: "" -stages: - - buildx - - deploy -buildx: - image: docker:19.03-git - stage: buildx - variables: - GIT_STRATEGY: none - artifacts: - paths: - - buildx - expire_in: 1 hour - services: - - docker:19.03-dind +services: + - docker:dind + +build: + stage: build script: - - export DOCKER_BUILDKIT=1 - - git clone git://github.com/docker/buildx ./docker-buildx - - docker build --platform=local -o . ./docker-buildx - -deploy: - image: docker:19.03 - stage: deploy - services: - - name: docker:19.03-dind - command: ["--experimental"] - before_script: - - mkdir -p ~/.docker/cli-plugins - - mv buildx ~/.docker/cli-plugins/docker-buildx - - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes variables: IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG script: From 3d504fbfb058b1628ffb6e769cca933e41ce0601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Thu, 10 Jun 2021 09:20:56 +0200 Subject: [PATCH 22/29] make build platforms configurable via CI var --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 46efcda..d7d1a9d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,7 @@ build: script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker buildx create --use --name mybuilder - - docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t $IMAGE_TAG . + - docker buildx build --platform $BUILD_PLATFORMS --push -t $IMAGE_TAG . - docker pull $IMAGE_TAG - docker tag $IMAGE_TAG $CI_REGISTRY_IMAGE:latest - docker push $CI_REGISTRY_IMAGE:latest From a4482be8eae10667221d7cca6faffb133e9f82fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Thu, 10 Jun 2021 09:22:16 +0200 Subject: [PATCH 23/29] unique buildx builder name to prevent hickups --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7d1a9d..8ca9719 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,7 @@ build: IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - docker buildx create --use --name mybuilder + - docker buildx create --use --name A$CI_COMMIT_SHORT_SHA - docker buildx build --platform $BUILD_PLATFORMS --push -t $IMAGE_TAG . - docker pull $IMAGE_TAG - docker tag $IMAGE_TAG $CI_REGISTRY_IMAGE:latest From 8c16e380fc4b46667f82f514d023e4b3b328a6c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Thu, 10 Jun 2021 09:22:36 +0200 Subject: [PATCH 24/29] removed unused/empty script --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ca9719..b3bd7f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,6 @@ services: build: stage: build - script: variables: IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG script: From a3c4066f287ed11aef45de76092e01a8747ca8d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Wed, 16 Jun 2021 10:30:59 +0200 Subject: [PATCH 25/29] removed old link to the original github repo (will have to write a new readme and reference it ther) --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 89ba3c0..eb52768 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,6 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.description="Prosody IM Docker image based on Alpine Linux" \ org.label-schema.url="https://prosody.im/" \ org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url="https://github.com/joschi/docker-prosody-alpine" \ org.label-schema.version=$VERSION \ org.label-schema.schema-version="1.0" \ com.microscaling.docker.dockerfile="/Dockerfile" \ From 5ffb34a8c0045369c54b9e5223ba548908f646d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Wed, 16 Jun 2021 10:31:47 +0200 Subject: [PATCH 26/29] new single stage ci and push to docker hub --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3bd7f3..be8aaca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,10 +12,10 @@ build: stage: build variables: IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG + D_IMAGE_TAG: egon0/prosody-alpine-ldap-multiarch:$CI_COMMIT_REF_SLUG + D_LATEST_TAG: egon0/prosody-alpine-ldap-multiarch:latest script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD - docker buildx create --use --name A$CI_COMMIT_SHORT_SHA - - docker buildx build --platform $BUILD_PLATFORMS --push -t $IMAGE_TAG . - - docker pull $IMAGE_TAG - - docker tag $IMAGE_TAG $CI_REGISTRY_IMAGE:latest - - docker push $CI_REGISTRY_IMAGE:latest + - docker buildx build --platform $BUILD_PLATFORMS --push -t $IMAGE_TAG -t $CI_REGISTRY_IMAGE:latest -t $D_IMAGE_TAG -t $D_LATEST_TAG . From 3ea970a14e0043687b2dc72098beeb5c6605f427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Tue, 24 Aug 2021 15:41:37 +0200 Subject: [PATCH 27/29] remove the reference to the private old registry --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be8aaca..2cf07b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: registry.gitlab.tictex.eu/docker/docker-with-buildx-git:latest +image: egon0/docker-with-buildx-and-git:latest variables: DOCKER_HOST: tcp://docker:2375/ From 777fe64cdcae98359263da55bb74c75d1fddc934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=20Gl=C3=A4=C3=9F-St=C3=B6cker?= Date: Fri, 22 Jul 2022 23:11:16 +0200 Subject: [PATCH 28/29] updated base image to alpine 3.16 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index eb52768..e9dea06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.13 +FROM alpine:3.16 MAINTAINER Micha Gläß-Stöcker # Build-time metadata as defined at http://label-schema.org From 2823980be560dccbcb3fe73ae744b6c61a843ed4 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 23 Jul 2022 08:59:21 +0000 Subject: [PATCH 29/29] Add renovate.json --- renovate.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..7190a60 --- /dev/null +++ b/renovate.json @@ -0,0 +1,3 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json" +}