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

Commit

Permalink
Switch build to epel release (#32)
Browse files Browse the repository at this point in the history
* Switch build to epel

* update dep

* fix sha

* Remove bc
  • Loading branch information
alexeykazakov authored Dec 17, 2018
1 parent 3af1516 commit 26397da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
17 changes: 9 additions & 8 deletions Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,33 @@ ENV LANG=en_US.utf8
ARG USE_GO_VERSION_FROM_WEBSITE=0

# Some packages might seem weird but they are required by the RVM installer.
RUN yum --enablerepo=centosplus install -y --quiet \
RUN yum install epel-release -y \
&& yum --enablerepo=centosplus --enablerepo=epel install -y \
findutils \
git \
$(test -z $USE_GO_VERSION_FROM_WEBSITE && echo "golang") \
$(test "$USE_GO_VERSION_FROM_WEBSITE" != 1 && echo "golang") \
make \
procps-ng \
tar \
wget \
which \
&& yum clean all

RUN test -n $USE_GO_VERSION_FROM_WEBSITE \
&& cd /tmp \
&& wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz \
RUN if [[ "$USE_GO_VERSION_FROM_WEBSITE" = 1 ]]; then 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 \
&& sha256sum -c checksum \
&& tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz \
&& rm -f go1.10.linux-amd64.tar.gz
&& rm -f go1.10.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
ENV GOPATH /tmp/go
RUN mkdir -p $GOPATH/bin && chmod a+rwx $GOPATH
RUN cd $GOPATH/bin \
curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o dep \
echo "31144e465e52ffbc0035248a10ddea61a09bf28b00784fd3fdd9882c8cbb2315 dep" > dep-linux-amd64.sha256 \
curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o dep \
echo "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 dep" > dep-linux-amd64.sha256 \
sha256sum -c dep-linux-amd64.sha256

ENTRYPOINT ["/bin/bash"]
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GIT_BIN := $(shell command -v $(GIT_BIN_NAME) 2> /dev/null)
DEP_BIN_NAME := dep
DEP_BIN_DIR := ./tmp/bin
DEP_BIN := $(DEP_BIN_DIR)/$(DEP_BIN_NAME)
DEP_VERSION=v0.4.1
DEP_VERSION=v0.5.0
GO_BIN := $(shell command -v $(GO_BIN_NAME) 2> /dev/null)
DOCKER_BIN := $(shell command -v $(DOCKER_BIN_NAME) 2> /dev/null)

Expand Down Expand Up @@ -115,12 +115,12 @@ $(DEP_BIN):
ifeq ($(UNAME_S),Darwin)
@curl -L -s https://github.com/golang/dep/releases/download/$(DEP_VERSION)/dep-darwin-amd64 -o $(DEP_BIN)
@cd $(DEP_BIN_DIR) && \
echo "1544afdd4d543574ef8eabed343d683f7211202a65380f8b32035d07ce0c45ef dep" > dep-darwin-amd64.sha256 && \
echo "1a7bdb0d6c31ecba8b3fd213a1170adf707657123e89dff234871af9e0498be2 dep" > dep-darwin-amd64.sha256 && \
shasum -a 256 --check dep-darwin-amd64.sha256
else
@curl -L -s https://github.com/golang/dep/releases/download/$(DEP_VERSION)/dep-linux-amd64 -o $(DEP_BIN)
@cd $(DEP_BIN_DIR) && \
echo "31144e465e52ffbc0035248a10ddea61a09bf28b00784fd3fdd9882c8cbb2315 dep" > dep-linux-amd64.sha256 && \
echo "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83 dep" > dep-linux-amd64.sha256 && \
sha256sum -c dep-linux-amd64.sha256
endif
@chmod +x $(DEP_BIN)
Expand Down

0 comments on commit 26397da

Please sign in to comment.