Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Use golang 1.9.4 from website #2383

Merged
merged 5 commits into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .make/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PACKAGE_PATH=$(GOPATH_IN_CONTAINER)/src/$(PACKAGE_NAME)
## Builds the docker image used to build the software.
docker-image-builder:
@echo "Building docker image $(DOCKER_IMAGE_CORE)"
docker build --build-arg USE_GO_VERSION_FROM_WEBSITE=$(USE_GO_VERSION_FROM_WEBSITE) -t $(DOCKER_IMAGE_CORE) -f $(CUR_DIR)/Dockerfile.builder $(CUR_DIR)
docker build -t $(DOCKER_IMAGE_CORE) -f $(CUR_DIR)/Dockerfile.builder $(CUR_DIR)

.PHONY: docker-image-deploy
## Creates a runnable image using the artifacts from the bin directory.
Expand Down
16 changes: 8 additions & 8 deletions Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ FROM centos:7
LABEL maintainer "Devtools <[email protected]>"
LABEL author "Konrad Kleine <[email protected]>"
ENV LANG=en_US.utf8
ARG USE_GO_VERSION_FROM_WEBSITE=0
ARG USE_GO_VERSION_FROM_WEBSITE=1

# Some packages might seem weird but they are required by the RVM installer.
RUN yum --enablerepo=centosplus install -y --quiet \
findutils \
git \
$(test -z $USE_GO_VERSION_FROM_WEBSITE && echo "golang") \
$(test "$USE_GO_VERSION_FROM_WEBSITE" != 1 && echo "golang") \
make \
procps-ng \
tar \
Expand All @@ -18,13 +18,13 @@ RUN yum --enablerepo=centosplus install -y --quiet \
postgresql \
&& yum clean all

RUN test -n $USE_GO_VERSION_FROM_WEBSITE \
&& cd /tmp \
&& wget --no-verbose https://dl.google.com/go/go1.10.linux-amd64.tar.gz \
&& echo "b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33 go1.10.linux-amd64.tar.gz" > checksum \
RUN if [[ "$USE_GO_VERSION_FROM_WEBSITE" = 1 ]]; then cd /tmp \
&& wget --no-verbose https://dl.google.com/go/go1.9.4.linux-amd64.tar.gz \
&& echo "15b0937615809f87321a457bb1265f946f9f6e736c563d6c5e0bd2c22e44f779 go1.9.4.linux-amd64.tar.gz" > checksum \
&& sha256sum -c checksum \
&& tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz \
&& rm -f go1.10.linux-amd64.tar.gz
&& tar -C /usr/local -xzf go1.9.4.linux-amd64.tar.gz \
&& rm -f go1.9.4.linux-amd64.tar.gz; \
fi
ENV PATH=$PATH:/usr/local/go/bin

# Get dep for Go package management and make sure the directory has full rwz permissions for non-root users
Expand Down