Skip to content

Commit

Permalink
remove gvm from base
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnuj committed Sep 25, 2023
1 parent d2d84c3 commit 9fef2e4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
15 changes: 4 additions & 11 deletions alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ RUN set -eu &&\
curl \
git

SHELL [ "/bin/bash", "-c" ]

# install gvm
RUN set -e && \
/bin/bash < <(curl -sSL https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) && \
source ${HOME}/.gvm/scripts/gvm && \
for version in 1.18 1.19 1.20; do \
gvm install "go${version}"; \
done

COPY ./bin/install-mimalloc ./bin/install-wasmvm /usr/local/bin/

################################################################################
Expand Down Expand Up @@ -54,10 +44,13 @@ WORKDIR ${GOPATH}/src/app
ENV GIT_TAG=${GIT_TAG} \
GIT_REPO=${GIT_REPO}

RUN set -ex && \
SHELL [ "/bin/bash", "-c" ]

RUN set -e && \
git clone -b ${GIT_TAG} https://github.com/${GIT_REPO}.git ./ && \
export GO_MOD_VERSION="$(awk '/^go /{print $2}' go.mod)" && \
if [[ "${GO_VERSION}" != "${GO_MOD_VERSION}"* ]]; then \
/bin/bash < <(curl -sSL https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) && \
source ${HOME}/.gvm/scripts/gvm && \
gvm install go${GO_MOD_VERSION} && \
gvm use go${GO_MOD_VERSION}; \
Expand Down
15 changes: 12 additions & 3 deletions arch.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM --platform=${BUILDPLATFORM} ${BASE_IMAGE} as base

ARG OS
ARG ARCH
ARG GO_VERSION="1.20"
ARG GO_VERSION="1.20.8"

# # NOTE: add libusb-dev to run with LEDGER_ENABLED=true
RUN set -eu & \
Expand Down Expand Up @@ -47,9 +47,18 @@ WORKDIR ${GOPATH}/src/app
ENV GIT_TAG=${GIT_TAG} \
GIT_REPO=${GIT_REPO}

RUN set -eu && \
SHELL [ "/bin/bash", "-c" ]

RUN set -e && \
git clone -b ${GIT_TAG} https://github.com/${GIT_REPO}.git ./ && \
go mod download
export GO_MOD_VERSION="$(awk '/^go /{print $2}' go.mod)" && \
if [[ "${GO_VERSION}" != "${GO_MOD_VERSION}"* ]]; then \
/bin/bash < <(curl -sSL https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) && \
source ${HOME}/.gvm/scripts/gvm && \
gvm install go${GO_MOD_VERSION} && \
gvm use go${GO_MOD_VERSION}; \
fi && \
go mod download -x

# download wasmvm if version is specified
RUN set -ux && \
Expand Down

0 comments on commit 9fef2e4

Please sign in to comment.