Skip to content

Commit

Permalink
Make go version arg in dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Faisal Memon <[email protected]>
  • Loading branch information
faisal-memon committed Jan 11, 2024
1 parent 9ba16ef commit 7d76e84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Build the spiffe-helper binary
FROM --platform=$BUILDPLATFORM golang:1.21.5-alpine as base
ARG go_version
FROM --platform=$BUILDPLATFORM golang:${go_version}-alpine as base
WORKDIR /workspace

# Cache deps before building and copying source so that we don't need to re-download as much
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ container-builder: ## Create a buildx node to create crossplatform images.
spiffe-helper-image.tar: Dockerfile FORCE | container-builder
$(CONTAINER_TOOL) buildx build \
--platform $(PLATFORMS) \
--build-arg go_version=$(go_version) \
--target spiffe-helper \
-o type=oci,dest=$@ \
.
Expand Down

0 comments on commit 7d76e84

Please sign in to comment.