diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 7a0c572..d78cdf5 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -38,7 +38,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + uses: docker/metadata-action@v3 with: images: ${{ github.repository_owner }}/aws-auth @@ -47,6 +47,6 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.docker_meta.outputs.tags }} diff --git a/Dockerfile b/Dockerfile index 5d7e150..fee5080 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17-alpine +FROM golang:1.17-alpine as build RUN apk add --update --no-cache \ curl \ @@ -12,9 +12,12 @@ COPY . . RUN git rev-parse HEAD RUN date +%FT%T%z RUN make build -RUN cp ./bin/aws-auth /bin/aws-auth \ - && chmod +x /bin/aws-auth -ENV HOME /root +RUN chmod +x ./bin/aws-auth + +# Now copy it into our base image. +FROM gcr.io/distroless/base-debian11 +COPY --from=build /go/src/github.com/keikoproj/aws-auth/bin/aws-auth /bin/aws-auth +ENV HOME /root ENTRYPOINT ["/bin/aws-auth"] CMD ["help"]