Skip to content

Commit

Permalink
Merge pull request #63 from gthao313/dockerfile-update
Browse files Browse the repository at this point in the history
use latest version SDK and go
  • Loading branch information
gthao313 committed Aug 30, 2021
2 parents 4678425 + c451ec2 commit 547b9a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG LICENSES_IMAGE=scratch

# GOLANG_IMAGE is the go toolchain container image used to build the update
# operator.
ARG GOLANG_IMAGE=golang:1.14.1
ARG GOLANG_IMAGE=golang:1.16.5

FROM $LICENSES_IMAGE as licenses
# Set WORKDIR to create /licenses/ if the directory is missing.
Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ SHORT_SHA = $(shell git describe --abbrev=8 --always --dirty='-dev' --exclude '*
# image, it is appended to the IMAGE_NAME unless the name is specified.
IMAGE_ARCH_SUFFIX = $(addprefix -,$(ARCH))
# BUILDSYS_SDK_IMAGE is the Bottlerocket SDK image used for license scanning.
BUILDSYS_SDK_IMAGE ?= bottlerocket/sdk-$(UNAME_ARCH):v0.10.1
BUILDSYS_SDK_VERSION=v0.22.0
BUILDSYS_SDK_IMAGE = public.ecr.aws/bottlerocket/bottlerocket-sdk-${UNAME_ARCH}:${BUILDSYS_SDK_VERSION}
# LICENSES_IMAGE_NAME is the name of the container image that has LICENSE files
# for distribution.
LICENSES_IMAGE = $(IMAGE_NAME)-licenses
Expand Down Expand Up @@ -195,11 +196,9 @@ get-nodes-status:
kubectl get nodes -o json | jq -C -S '.items | map(.metadata|{(.name): (.annotations|to_entries|map(select(.key|startswith("bottlerocket")))|from_entries)}) | add'

# sdk-image fetches and loads the bottlerocket SDK container image for build and
# license collection.
sdk-image: BUILDSYS_SDK_IMAGE_URL=https://cache.bottlerocket.aws/$(BUILDSYS_SDK_IMAGE).tar.gz
sdk-image:
docker inspect $(BUILDSYS_SDK_IMAGE) &>/dev/null \
|| curl -# -qL $(BUILDSYS_SDK_IMAGE_URL) | docker load -i /dev/stdin
docker image inspect $(BUILDSYS_SDK_IMAGE) &>/dev/null \
|| docker pull "${BUILDSYS_SDK_IMAGE}"

# licenses builds a container image with the LICENSE & legal files from the
# source's dependencies. This image is consumed during build (see `container`)
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile.licenses
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ARG SDK_IMAGE
# GOLANG_IMAGE is the image to be used for collecting modules. This should be
# the same image used in the build. The idea is to have the same toolchain to
# avoid running into any differences between versions.
ARG GOLANG_IMAGE=golang:1.14.1
ARG GOLANG_IMAGE=golang:1.16.5

# Fetch dependencies into a vendor/ directory.
#
Expand Down

0 comments on commit 547b9a2

Please sign in to comment.