From c5d2e083bf7c17bb787a319d0cc8f3b3b196b8c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20W=C3=B6rle?= Date: Thu, 4 Aug 2022 17:37:02 +0200 Subject: [PATCH 1/9] Change cupsd default conf file location --- root/root/run_cups.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/root/root/run_cups.sh b/root/root/run_cups.sh index dbda4de..61542a9 100644 --- a/root/root/run_cups.sh +++ b/root/root/run_cups.sh @@ -30,6 +30,10 @@ if [ `ls -l /config/printers.conf 2>/dev/null | wc -l` -eq 0 ]; then fi cp /config/printers.conf /etc/cups/printers.conf +if [ `ls -l /config/cupsd.conf 2>/dev/null | wc -l` -eq 0 ]; then + cp /etc/cups/cupsd.conf /config/cupsd.conf +fi + /usr/sbin/avahi-daemon --daemonize /root/printer-update.sh & -exec /usr/sbin/cupsd -f +exec /usr/sbin/cupsd -f -c /config/cupsd.conf From 2646a80f63a346c2b65da22b1a1b527085802efb Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Thu, 11 Aug 2022 13:55:20 -0600 Subject: [PATCH 2/9] Specify Alpine base image version number Getting away form latest tag to things don't break with a major update. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7e6e0c7..f094a49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:latest +FROM alpine:3.16 # Install the packages we need. Avahi will be included RUN echo -e "http://nl.alpinelinux.org/alpine/edge/testing\nhttp://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories &&\ From 1dbcecdf1e1a730e37e3e522baae44c147e407d4 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Thu, 11 Aug 2022 14:22:04 -0600 Subject: [PATCH 3/9] Manage versions --- version.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 version.txt diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..9084fa2 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.1.0 From 6bd8f3963431133a3af4c0bfbb919d7d140d3265 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Thu, 11 Aug 2022 14:26:59 -0600 Subject: [PATCH 4/9] Export version variable --- buildspec.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildspec.yml b/buildspec.yml index 8f618e4..bb64e4b 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -5,6 +5,8 @@ env: secrets-manager: DOCKERHUB_PASS: "/dockerhub/credentials:password" DOCKERHUB_USERNAME: "/dockerhub/credentials:username" + exported-variables: + - VERSION phases: install: commands: From 7baa2431539cd2a39fb42dca282e9e9160c1950b Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Thu, 11 Aug 2022 14:43:39 -0600 Subject: [PATCH 5/9] Read VERSION variable and tag --- buildspec.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/buildspec.yml b/buildspec.yml index bb64e4b..aeddece 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -5,8 +5,10 @@ env: secrets-manager: DOCKERHUB_PASS: "/dockerhub/credentials:password" DOCKERHUB_USERNAME: "/dockerhub/credentials:username" - exported-variables: - - VERSION + variables: + VERSION: $(cat version.txt) + exported-variables: + - VERSION phases: install: commands: @@ -15,17 +17,14 @@ phases: commands: - echo Logging in to DOCKER... - docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASS - #- $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION) build: commands: - echo Build started on `date` - echo Building the Docker image... - - docker build -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG . - - docker tag $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG - #- docker tag $IMAGE_REPO_NAME:$IMAGE_TAG $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG + - docker build -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION . + - docker tag $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG post_build: commands: - echo Build completed on `date` - echo Pushing the Docker image... - - docker push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG - #- docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG + - docker push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG From d5eb27e12625cb3d92c57729898a89db2128e254 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Thu, 11 Aug 2022 15:01:43 -0600 Subject: [PATCH 6/9] Update buildspec.yml --- buildspec.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/buildspec.yml b/buildspec.yml index aeddece..60fc1d4 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -5,10 +5,10 @@ env: secrets-manager: DOCKERHUB_PASS: "/dockerhub/credentials:password" DOCKERHUB_USERNAME: "/dockerhub/credentials:username" - variables: - VERSION: $(cat version.txt) - exported-variables: - - VERSION +# variables: +# VERSION: $(cat version.txt) +# exported-variables: +# - VERSION phases: install: commands: @@ -20,7 +20,8 @@ phases: build: commands: - echo Build started on `date` - - echo Building the Docker image... + - echo Building the Docker image... + - VERSION=$(cat version.txt) - docker build -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION . - docker tag $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG post_build: From 9cdce526122a441664f46c9de53e41e55e4d99d9 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Fri, 19 Aug 2022 09:32:24 -0600 Subject: [PATCH 7/9] Combine tag and push commands --- buildspec.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/buildspec.yml b/buildspec.yml index 60fc1d4..3db99dd 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -5,10 +5,6 @@ env: secrets-manager: DOCKERHUB_PASS: "/dockerhub/credentials:password" DOCKERHUB_USERNAME: "/dockerhub/credentials:username" -# variables: -# VERSION: $(cat version.txt) -# exported-variables: -# - VERSION phases: install: commands: @@ -22,10 +18,9 @@ phases: - echo Build started on `date` - echo Building the Docker image... - VERSION=$(cat version.txt) - - docker build -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION . - - docker tag $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG + - docker build -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG . post_build: commands: - echo Build completed on `date` - echo Pushing the Docker image... - - docker push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG + - docker push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME --all-tags From ddccd428949717d0fdc6dc89b409a8261cf833e4 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Fri, 19 Aug 2022 09:57:40 -0600 Subject: [PATCH 8/9] Add version and latest tags --- buildspec-manifest.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/buildspec-manifest.yml b/buildspec-manifest.yml index 92b4457..8077aaa 100644 --- a/buildspec-manifest.yml +++ b/buildspec-manifest.yml @@ -17,15 +17,19 @@ phases: build: commands: - echo Build started on `date` - - echo Building the Docker manifest... + - echo Building the Docker manifest... + - VERSION=$(cat version.txt) - export DOCKER_CLI_EXPERIMENTAL=enabled - - docker manifest create $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:latest-arm64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:latest-amd64 - - docker manifest annotate --arch arm64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:latest-arm64 - - docker manifest annotate --arch amd64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:latest-amd64 + - docker manifest create $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION-arm64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION-amd64 + - docker manifest annotate --arch arm64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION-arm64 + - docker manifest annotate --arch amd64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION-amd64 + - docker manifest create $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:latest $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION-arm64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION-amd64 + - docker manifest annotate --arch arm64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION-arm64 + - docker manifest annotate --arch amd64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION-amd64 post_build: commands: - echo Build completed on `date` - echo Pushing the Docker image... - - docker manifest push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME - - docker manifest inspect $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME + - docker manifest push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION + - docker manifest push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:latest From 16a7a5ccf4f63b9a8318bbf340cd7639f547d9b5 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Fri, 19 Aug 2022 10:01:44 -0600 Subject: [PATCH 9/9] Version and architecture tags --- buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildspec.yml b/buildspec.yml index 3db99dd..55d63cf 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -18,7 +18,7 @@ phases: - echo Build started on `date` - echo Building the Docker image... - VERSION=$(cat version.txt) - - docker build -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG . + - docker build -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION-$ARCH -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG-$ARCH . post_build: commands: - echo Build completed on `date`