Skip to content

Commit

Permalink
Swap to alpine container to minimize dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Vazquez <[email protected]>
  • Loading branch information
austinvazquez committed Apr 22, 2024
1 parent 70c9c37 commit da66e12
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions .codebuild/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ phases:
install:
commands:
- chmod +x -R scripts
- ./scripts/install_deps.sh
- ./scripts/hack/codepipeline-git-commit.sh
- ./scripts/hack/symlink-gopath-codebuild.sh
- cd /go/src/github.com/awslabs/amazon-ecr-credential-helper
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ jobs:
cross-compile:
runs-on: 'ubuntu-22.04'
container: public.ecr.aws/docker/library/golang:1.21
container: public.ecr.aws/docker/library/golang:1.21-alpine
steps:
- name: Install dependencies to container
run: ./scripts/install_deps.sh
- uses: actions/checkout@v4
with:
path: src/github.com/awslabs/amazon-ecr-credential-helper
Expand Down
25 changes: 25 additions & 0 deletions scripts/install_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

# Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

# A POSIX shell script which installs the required dependencies
# to build the Amazon ECR credential helper variants in a Golang
# Alpine container.

set -ex

apk add --no-cache \
bash \
git \
make

0 comments on commit da66e12

Please sign in to comment.