diff --git a/README.md b/README.md index 114b926..cb30631 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ 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. +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. ## Configuration diff --git a/buildspec-manifest.yml b/buildspec-manifest.yml new file mode 100644 index 0000000..92b4457 --- /dev/null +++ b/buildspec-manifest.yml @@ -0,0 +1,31 @@ +version: 0.2 +#Buildspec file for AWS Codebuild +#Generates multi-arch 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 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 $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 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME + - docker manifest inspect $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 0000000..8f618e4 --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,29 @@ +version: 0.2 +#Generic buildspec file for AWS Codebuild +#Works for both ARM and AMD builds +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 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 + 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