Skip to content

Commit

Permalink
Add job to build docker images without CGO
Browse files Browse the repository at this point in the history
  • Loading branch information
maraino committed Jan 26, 2023
1 parent 171a23f commit 475d4c6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,17 @@ jobs:
docker_image: smallstep/step-kms-plugin
docker_file: docker/Dockerfile
secrets: inherit

build_upload_docker_cloud:
name: Build & Upload Cloud Only Docker Images
needs: create_release
permissions:
id-token: write
contents: write
uses: smallstep/workflows/.github/workflows/docker-buildx-push.yml@main
with:
platforms: linux/amd64,linux/arm64
tags: ${{ needs.create_release.outputs.docker_tags }}
docker_image: smallstep/step-kms-plugin-cloud
docker_file: docker/Dockerfile.cloud
secrets: inherit
15 changes: 15 additions & 0 deletions docker/Dockerfile.cloud
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM golang:alpine AS builder

WORKDIR /src
COPY . .

RUN apk add --no-cache git make
RUN make V=1 CGO_ENABLED=0 build

FROM smallstep/step-cli:latest

COPY --from=builder /src/bin/step-kms-plugin /usr/local/bin/step-kms-plugin

USER step

CMD ["/bin/bash"]

0 comments on commit 475d4c6

Please sign in to comment.