Skip to content

Commit

Permalink
Get the go version to build docker image from .go_version
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano committed Apr 4, 2024
1 parent 7ecda4c commit 1d6e3bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .buildkite/scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ source .buildkite/scripts/tooling.sh
set -euo pipefail

build_docker_image() {
local go_version
go_version=$(cat .go-version)

docker buildx build "$@" \
--platform linux/amd64,linux/arm64/v8 \
-t "${DOCKER_IMG_TAG}" \
-t "${DOCKER_IMG_TAG_BRANCH}" \
--build-arg GO_VERSION="${go_version}" \
--build-arg BUILDER_IMAGE=docker.elastic.co/wolfi/go \
--build-arg RUNNER_IMAGE=docker.elastic.co/wolfi/chainguard-base \
--label BRANCH_NAME="${TAG_NAME}" \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This image contains the package-registry binary.
# It expects packages to be mounted under /packages/package-registry or have a config file loaded into /package-registry/config.yml

ARG GO_VERSION=1.22.2
ARG GO_VERSION
ARG BUILDER_IMAGE=golang
ARG RUNNER_IMAGE=cgr.dev/chainguard/wolfi-base

Expand Down

0 comments on commit 1d6e3bd

Please # to comment.