From e2ebc158f1b9aa87fca33bc2dbb9fbc3036580bb Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 11:00:22 -0600 Subject: [PATCH 01/23] buildspec created for AWS codebuild --- buildspec.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 buildspec.yml diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 0000000..e6fffbc --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,18 @@ +version: 0.2 + +phases: + pre_build: + commands: + - echo Logging in to Amazon ECR... + - aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com + build: + commands: + - echo Build started on `date` + - echo Building the Docker image... + - docker build -t $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 + post_build: + commands: + - echo Build completed on `date` + - echo Pushing the Docker image... + - docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG From a89da4cd01a18f9b2fc9cbffd926e9af5c398af7 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 11:14:41 -0600 Subject: [PATCH 02/23] Update buildspec.yml --- buildspec.yml | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/buildspec.yml b/buildspec.yml index e6fffbc..bd26615 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -1,18 +1,24 @@ version: 0.2 -phases: - pre_build: - commands: - - echo Logging in to Amazon ECR... - - aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com - build: - commands: - - echo Build started on `date` - - echo Building the Docker image... - - docker build -t $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 - post_build: - commands: - - echo Build completed on `date` - - echo Pushing the Docker image... - - docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG +batch: + fast-fail: false + build-graph: + - identifier: build1 + env: + variables: + BUILD_ID: build1 + ignore-failure: false + buildspec: amd64.yml +# - identifier: build2 +# buildspec: build2.yml +# env: +# variables: +# BUILD_ID: build2 +# depend-on: +# - build1 +# - identifier: build3 +# env: +# variables: +# BUILD_ID: build3 +# depend-on: +# - build2 From b0a3bd08e94d068a1a57a6057947bd158e787ffd Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 11:15:15 -0600 Subject: [PATCH 03/23] Create amd64.yml --- amd64.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 amd64.yml diff --git a/amd64.yml b/amd64.yml new file mode 100644 index 0000000..e6fffbc --- /dev/null +++ b/amd64.yml @@ -0,0 +1,18 @@ +version: 0.2 + +phases: + pre_build: + commands: + - echo Logging in to Amazon ECR... + - aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com + build: + commands: + - echo Build started on `date` + - echo Building the Docker image... + - docker build -t $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 + post_build: + commands: + - echo Build completed on `date` + - echo Pushing the Docker image... + - docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG From f36d94b1b461fa96fb919401d8fd83741e3966a8 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 11:40:15 -0600 Subject: [PATCH 04/23] Update buildspec.yml --- buildspec.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildspec.yml b/buildspec.yml index bd26615..c69e212 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -6,7 +6,8 @@ batch: - identifier: build1 env: variables: - BUILD_ID: build1 + BUILD_ID: amd64 + IMAGE_TAG: amd64 ignore-failure: false buildspec: amd64.yml # - identifier: build2 From 6a3fc95ebcc0f2efb7025eb5d15611911889ee62 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 11:48:58 -0600 Subject: [PATCH 05/23] Update buildspec.yml --- buildspec.yml | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/buildspec.yml b/buildspec.yml index c69e212..0df38eb 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -1,25 +1,18 @@ version: 0.2 - -batch: - fast-fail: false - build-graph: - - identifier: build1 - env: - variables: - BUILD_ID: amd64 - IMAGE_TAG: amd64 - ignore-failure: false - buildspec: amd64.yml -# - identifier: build2 -# buildspec: build2.yml -# env: -# variables: -# BUILD_ID: build2 -# depend-on: -# - build1 -# - identifier: build3 -# env: -# variables: -# BUILD_ID: build3 -# depend-on: -# - build2 +phases: + install: + commands: + - yum update -y + pre_build: + commands: + - echo Logging in to Amazon ECR... + - $(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 $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 + post_build: + commands: + - echo Build completed on `date` From 4156d950600b6f9d3e3679598d6d2feed6ef1440 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 11:51:24 -0600 Subject: [PATCH 06/23] Create buildspec-manifest.yml --- buildspec-manifest.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 buildspec-manifest.yml diff --git a/buildspec-manifest.yml b/buildspec-manifest.yml new file mode 100644 index 0000000..ad03656 --- /dev/null +++ b/buildspec-manifest.yml @@ -0,0 +1,27 @@ +version: 0.2 +# Based on the Docker documentation, must include the DOCKER_CLI_EXPERIMENTAL environment variable +# https://docs.docker.com/engine/reference/commandline/manifest/ + +phases: + install: + commands: + - yum update -y + pre_build: + commands: + - echo Logging in to Amazon ECR... + - $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION) + build: + commands: + - echo Build started on `date` + - echo Building the Docker manifest... + - export DOCKER_CLI_EXPERIMENTAL=enabled + - docker manifest create $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-arm64v8 $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-amd64 + - docker manifest annotate --arch arm64 $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-arm64v8 + - docker manifest annotate --arch amd64 $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-amd64 + + post_build: + commands: + - echo Build completed on `date` + - echo Pushing the Docker image... + - docker manifest push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME + - docker manifest inspect $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME From 3d27a99e869c47c998efa0e71e8ce5d54eb70884 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 12:44:21 -0600 Subject: [PATCH 07/23] Update buildspec-manifest.yml --- buildspec-manifest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildspec-manifest.yml b/buildspec-manifest.yml index ad03656..f803756 100644 --- a/buildspec-manifest.yml +++ b/buildspec-manifest.yml @@ -15,8 +15,8 @@ phases: - echo Build started on `date` - echo Building the Docker manifest... - export DOCKER_CLI_EXPERIMENTAL=enabled - - docker manifest create $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-arm64v8 $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-amd64 - - docker manifest annotate --arch arm64 $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-arm64v8 + - docker manifest create $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-arm64 $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-amd64 + - docker manifest annotate --arch arm64 $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-arm64 - docker manifest annotate --arch amd64 $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-amd64 post_build: From f2a36bcb69ef93c6e7c704949c515dcc52fda0f4 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 13:10:10 -0600 Subject: [PATCH 08/23] Update buildspec.yml --- buildspec.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildspec.yml b/buildspec.yml index 0df38eb..131f218 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -16,3 +16,5 @@ phases: post_build: commands: - echo Build completed on `date` + - echo Pushing the Docker image... + - docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG From 3416ceeb250b95f9e7a2e81457b68e1153a9692a Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 13:54:06 -0600 Subject: [PATCH 09/23] Delete amd64.yml --- amd64.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 amd64.yml diff --git a/amd64.yml b/amd64.yml deleted file mode 100644 index e6fffbc..0000000 --- a/amd64.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 0.2 - -phases: - pre_build: - commands: - - echo Logging in to Amazon ECR... - - aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com - build: - commands: - - echo Build started on `date` - - echo Building the Docker image... - - docker build -t $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 - post_build: - commands: - - echo Build completed on `date` - - echo Pushing the Docker image... - - docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG From 7c67d5892ac5e6afd1ba395c0265a4dc33ac389f Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 14:17:25 -0600 Subject: [PATCH 10/23] Update buildspec.yml --- buildspec.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/buildspec.yml b/buildspec.yml index 131f218..b568984 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -1,20 +1,27 @@ version: 0.2 +env: + secrets-manager: + DOCKERHUB_PASS: "/dockerhub/credentials:password" + DOCKERHUB_USERNAME: "/dockerhub/credentials:username" phases: install: commands: - yum update -y pre_build: commands: - - echo Logging in to Amazon ECR... - - $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION) + - 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 $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 tag $IMAGE_REPO_NAME:$IMAGE_TAG $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 post_build: commands: - echo Build completed on `date` - echo Pushing the Docker image... - - docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG + - docker push $IMAGE_REPO_NAME:$IMAGE_TAG + #- docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG From c7f9f5a4218614cb1d5c1363a8a7490097e23a55 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 14:21:20 -0600 Subject: [PATCH 11/23] Update buildspec-manifest.yml --- buildspec-manifest.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/buildspec-manifest.yml b/buildspec-manifest.yml index f803756..e9741eb 100644 --- a/buildspec-manifest.yml +++ b/buildspec-manifest.yml @@ -2,26 +2,30 @@ version: 0.2 # Based on the Docker documentation, must include the DOCKER_CLI_EXPERIMENTAL environment variable # https://docs.docker.com/engine/reference/commandline/manifest/ +env: + secrets-manager: + DOCKERHUB_PASS: "/dockerhub/credentials:password" + DOCKERHUB_USERNAME: "/dockerhub/credentials:username" phases: install: commands: - yum update -y pre_build: commands: - - echo Logging in to Amazon ECR... - - $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION) + - echo Logging in to DOCKER... + - docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASS build: commands: - echo Build started on `date` - echo Building the Docker manifest... - export DOCKER_CLI_EXPERIMENTAL=enabled - - docker manifest create $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-arm64 $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-amd64 - - docker manifest annotate --arch arm64 $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-arm64 - - docker manifest annotate --arch amd64 $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:latest-amd64 + - docker manifest create $IMAGE_REPO_NAME $IMAGE_REPO_NAME:latest-arm64 $IMAGE_REPO_NAME:latest-amd64 + - docker manifest annotate --arch arm64 $IMAGE_REPO_NAME $IMAGE_REPO_NAME:latest-arm64 + - docker manifest annotate --arch amd64 $IMAGE_REPO_NAME $IMAGE_REPO_NAME:latest-amd64 post_build: commands: - echo Build completed on `date` - echo Pushing the Docker image... - - docker manifest push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME - - docker manifest inspect $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME + - docker manifest push $IMAGE_REPO_NAME + - docker manifest inspect $IMAGE_REPO_NAME From 807e57844506ac13928af6b36a5e20bfe55cacdb Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 14:50:42 -0600 Subject: [PATCH 12/23] Update buildspec-manifest.yml --- buildspec-manifest.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/buildspec-manifest.yml b/buildspec-manifest.yml index e9741eb..bdab1d1 100644 --- a/buildspec-manifest.yml +++ b/buildspec-manifest.yml @@ -19,13 +19,13 @@ phases: - echo Build started on `date` - echo Building the Docker manifest... - export DOCKER_CLI_EXPERIMENTAL=enabled - - docker manifest create $IMAGE_REPO_NAME $IMAGE_REPO_NAME:latest-arm64 $IMAGE_REPO_NAME:latest-amd64 - - docker manifest annotate --arch arm64 $IMAGE_REPO_NAME $IMAGE_REPO_NAME:latest-arm64 - - docker manifest annotate --arch amd64 $IMAGE_REPO_NAME $IMAGE_REPO_NAME:latest-amd64 + - 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 post_build: commands: - echo Build completed on `date` - echo Pushing the Docker image... - - docker manifest push $IMAGE_REPO_NAME - - docker manifest inspect $IMAGE_REPO_NAME + - docker manifest push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME + - docker manifest inspect $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME From 36b80af452b9cde26bac361aec8d76e07952017b Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 14:52:31 -0600 Subject: [PATCH 13/23] Update buildspec.yml --- buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildspec.yml b/buildspec.yml index b568984..431e5ed 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -23,5 +23,5 @@ phases: commands: - echo Build completed on `date` - echo Pushing the Docker image... - - docker push $IMAGE_REPO_NAME:$IMAGE_TAG + - 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 From 0e311b81853152861622a4382283b8d558fe801c Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 15:01:22 -0600 Subject: [PATCH 14/23] Update buildspec-manifest.yml --- buildspec-manifest.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/buildspec-manifest.yml b/buildspec-manifest.yml index bdab1d1..25e956d 100644 --- a/buildspec-manifest.yml +++ b/buildspec-manifest.yml @@ -19,13 +19,13 @@ phases: - echo Build started on `date` - echo Building the Docker manifest... - 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 chuckcharlie/$IMAGE_REPO_NAME chuckcharlie/$IMAGE_REPO_NAME:latest-arm64 chuckcharlie/$IMAGE_REPO_NAME:latest-amd64 + - docker manifest annotate --arch arm64 chuckcharlie/$IMAGE_REPO_NAME chuckcharlie/$IMAGE_REPO_NAME:latest-arm64 + - docker manifest annotate --arch amd64 chuckcharlie/$IMAGE_REPO_NAME chuckcharlie/$IMAGE_REPO_NAME:latest-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 chuckcharlie/$IMAGE_REPO_NAME + - docker manifest inspect chuckcharlie/$IMAGE_REPO_NAME From 239e31bdd20f2da76a7f6a9045afc0442f16bcd7 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 15:03:29 -0600 Subject: [PATCH 15/23] Update buildspec.yml --- buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildspec.yml b/buildspec.yml index 431e5ed..e52fcd2 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -23,5 +23,5 @@ phases: commands: - echo Build completed on `date` - echo Pushing the Docker image... - - docker push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG + - docker push chuckcharlie/$IMAGE_REPO_NAME:$IMAGE_TAG #- docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG From babbe94bc17192d7f8955f51ceacbd4296136431 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 16:17:42 -0600 Subject: [PATCH 16/23] Update buildspec.yml --- buildspec.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildspec.yml b/buildspec.yml index e52fcd2..2d4be15 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -16,8 +16,8 @@ phases: commands: - echo Build started on `date` - echo Building the Docker image... - - docker build -t $IMAGE_REPO_NAME:$IMAGE_TAG . - - docker tag $IMAGE_REPO_NAME:$IMAGE_TAG $IMAGE_REPO_NAME:$IMAGE_TAG + - docker build -t chuckcharlie/$IMAGE_REPO_NAME:$IMAGE_TAG . + - docker tag chuckcharlie/$IMAGE_REPO_NAME:$IMAGE_TAG chuckcharlie/$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 post_build: commands: From f47abcd48a782c1feec5cdc26025b5f7a75e0a22 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 16:30:43 -0600 Subject: [PATCH 17/23] Update buildspec.yml --- buildspec.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildspec.yml b/buildspec.yml index 2d4be15..8058ea3 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -16,12 +16,12 @@ phases: commands: - echo Build started on `date` - echo Building the Docker image... - - docker build -t chuckcharlie/$IMAGE_REPO_NAME:$IMAGE_TAG . - - docker tag chuckcharlie/$IMAGE_REPO_NAME:$IMAGE_TAG chuckcharlie/$IMAGE_REPO_NAME:$IMAGE_TAG + - 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 post_build: commands: - echo Build completed on `date` - echo Pushing the Docker image... - - docker push chuckcharlie/$IMAGE_REPO_NAME:$IMAGE_TAG + - 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 From 3af53aee131ea1fd8f6e7b04565c61d9edb3b1c8 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Wed, 27 Jul 2022 16:31:13 -0600 Subject: [PATCH 18/23] Update buildspec-manifest.yml --- buildspec-manifest.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/buildspec-manifest.yml b/buildspec-manifest.yml index 25e956d..bdab1d1 100644 --- a/buildspec-manifest.yml +++ b/buildspec-manifest.yml @@ -19,13 +19,13 @@ phases: - echo Build started on `date` - echo Building the Docker manifest... - export DOCKER_CLI_EXPERIMENTAL=enabled - - docker manifest create chuckcharlie/$IMAGE_REPO_NAME chuckcharlie/$IMAGE_REPO_NAME:latest-arm64 chuckcharlie/$IMAGE_REPO_NAME:latest-amd64 - - docker manifest annotate --arch arm64 chuckcharlie/$IMAGE_REPO_NAME chuckcharlie/$IMAGE_REPO_NAME:latest-arm64 - - docker manifest annotate --arch amd64 chuckcharlie/$IMAGE_REPO_NAME chuckcharlie/$IMAGE_REPO_NAME:latest-amd64 + - 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 post_build: commands: - echo Build completed on `date` - echo Pushing the Docker image... - - docker manifest push chuckcharlie/$IMAGE_REPO_NAME - - docker manifest inspect chuckcharlie/$IMAGE_REPO_NAME + - docker manifest push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME + - docker manifest inspect $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME From 2b2c63e407a8d45a56f989e2723352320b6d9eae Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Tue, 2 Aug 2022 10:20:25 -0600 Subject: [PATCH 19/23] Added note about ARM support --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 114b926..75f449d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ Fork from [quadportnick/docker-cups-airprint](https://github.com/quadportnick/docker-cups-airprint) +### Now supports ARM64 and AMD64! +Use the *latest* tag to auto choose the right architecture. + This Alpine-based Docker image runs a CUPS instance that is meant as an AirPrint relay for printers that are already on the network but not AirPrint capable. The other images out there never seemed to work right. I forked the original to use Alpine instead of Ubuntu and work on more host OS's. ## Configuration From 0ff4c8e6f9d5a6c0c6b02f4fd1c9499bed97bced Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Tue, 2 Aug 2022 10:23:13 -0600 Subject: [PATCH 20/23] Added description. --- buildspec.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildspec.yml b/buildspec.yml index 8058ea3..2da5401 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -1,3 +1,5 @@ +#Generic buildspec file for AWS Codebuild +#Works for both ARM and AMD builds version: 0.2 env: secrets-manager: From f95e1a15ea060e83e195bacdca2d1dbb7d3a8c0b Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Tue, 2 Aug 2022 10:24:44 -0600 Subject: [PATCH 21/23] Added description --- buildspec-manifest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildspec-manifest.yml b/buildspec-manifest.yml index bdab1d1..92b4457 100644 --- a/buildspec-manifest.yml +++ b/buildspec-manifest.yml @@ -1,6 +1,6 @@ version: 0.2 -# Based on the Docker documentation, must include the DOCKER_CLI_EXPERIMENTAL environment variable -# https://docs.docker.com/engine/reference/commandline/manifest/ +#Buildspec file for AWS Codebuild +#Generates multi-arch manifest env: secrets-manager: From 73f28be0c9a1ddb78b7c548558bc234a09707fa5 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Tue, 2 Aug 2022 10:25:14 -0600 Subject: [PATCH 22/23] Modified description --- buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildspec.yml b/buildspec.yml index 2da5401..8f618e4 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -1,6 +1,6 @@ +version: 0.2 #Generic buildspec file for AWS Codebuild #Works for both ARM and AMD builds -version: 0.2 env: secrets-manager: DOCKERHUB_PASS: "/dockerhub/credentials:password" From d42e11465c2b350d5c034d7e736f733dcb43aea1 Mon Sep 17 00:00:00 2001 From: chuckcharlie Date: Tue, 2 Aug 2022 10:29:35 -0600 Subject: [PATCH 23/23] Added note about ARM and testing --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 75f449d..cb30631 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Fork from [quadportnick/docker-cups-airprint](https://github.com/quadportnick/do ### Now supports ARM64 and AMD64! Use the *latest* tag to auto choose the right architecture. +Please test and let me know. I don't have anything at home to test ARM with. This Alpine-based Docker image runs a CUPS instance that is meant as an AirPrint relay for printers that are already on the network but not AirPrint capable. The other images out there never seemed to work right. I forked the original to use Alpine instead of Ubuntu and work on more host OS's.