Skip to content

Commit

Permalink
etc: update Dockerfile and Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
  • Loading branch information
hdonnay committed Mar 17, 2022
1 parent 171469d commit 02ca493
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ podman-dev-down: etc/podman.yaml
podman pod stop -t 10 $$(awk '/^ name:/{print $$NF}' <$<)
podman pod rm $$(awk '/^ name:/{print $$NF}' <$<)

GO_VERSION ?= 1.16
GO_CHECKSUM ?= 013a489ebb3e24ef3d915abe5b94c3286c070dfe0818d5bca8108f1d6e8440d2
GO_VERSION ?= 1.18
GO_CHECKSUM ?= e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f
.PHONY: baseimage
baseimage:
buildah bud -f etc/Dockerfile -t quay.io/projectquay/golang:$(GO_VERSION) \
podman build -f etc/Dockerfile -t quay.io/projectquay/golang:$(GO_VERSION) \
--build-arg GO_VERSION=$(GO_VERSION) \
--build-arg GO_CHECKSUM=$(GO_CHECKSUM) \
etc
Expand Down
12 changes: 7 additions & 5 deletions etc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ RUN dnf install -q -y \
dnf clean all
ARG GO_VERSION
ARG GO_CHECKSUM
RUN if [ `uname -m` = "aarch64" ] ; then curl -sLo /tmp/go.tar.gz "https://dl.google.com/go/go${GO_VERSION}.linux-arm64.tar.gz" ; else curl -sLo /tmp/go.tar.gz "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" ; fi \
&& [ -z "${GO_CHECKSUM}" ] || echo "${GO_CHECKSUM} /tmp/go.tar.gz" | sha256sum -c -;\
tar -xz -C /usr/local/ -f /tmp/go.tar.gz;\
rm /tmp/go.tar.gz;\
/usr/local/go/bin/go version
RUN arch=$(case "$(uname -m)" in\
aarch64) echo arm64 ;;\
x86_64) echo amd64 ;;\
*) exit 99 ;; esac);\
curl -sSLfo /tmp/go.tar.gz "https://dl.google.com/go/go${GO_VERSION}.linux-${arch}.tar.gz";\
test -n "${GO_CHECKSUM}" && { echo "${GO_CHECKSUM} /tmp/go.tar.gz" | sha256sum -c - || exit 99; };\
tar -xz -C /usr/local/ -f /tmp/go.tar.gz && rm /tmp/go.tar.gz && /usr/local/go/bin/go version
ENV GOPATH=/go
ENV GOBIN=/usr/local/bin
ENV PATH="$PATH:/usr/local/go/bin"
Expand Down

0 comments on commit 02ca493

Please sign in to comment.