Skip to content

Commit

Permalink
fix: go in docker failing (#1989)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt <[email protected]>
  • Loading branch information
nrwiersma and matt0x6F authored Oct 7, 2024
1 parent 74b3cf5 commit 2712e2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmd/proxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ RUN DATE="$(date -u +%Y-%m-%d-%H:%M:%S-%Z)" && \

FROM alpine:${ALPINE_VERSION}

ENV GO111MODULE=on
ENV GOROOT="/usr/local/go" \
PATH=/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
GO111MODULE=on

COPY --from=builder /bin/athens-proxy /bin/athens-proxy
COPY --from=builder /go/src/github.com/gomods/athens/config.dev.toml /config/config.toml
COPY --from=builder /usr/local/go/bin/go /bin/go
COPY --from=builder /usr/local/go/bin/go /usr/local/go/bin/go
COPY --from=builder /usr/local/go/go.env /usr/local/go/go.env

RUN chmod 644 /config/config.toml

# Add tini, see https://github.com/gomods/athens/issues/1155 for details.
RUN apk add --update git git-lfs mercurial openssh-client subversion procps fossil tini && \
mkdir -p /usr/local/go
RUN apk add --update git git-lfs mercurial openssh-client subversion procps fossil tini

ARG USER=athens
RUN adduser -D -h /home/$USER $USER
Expand Down
2 changes: 2 additions & 0 deletions pkg/module/prepare_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ func prepareEnv(gopath string, envVars []string) []string {
"HTTP_PROXY",
"HTTPS_PROXY",
"NO_PROXY",
// GOROOT needs to be propagated if it exists.
"GOROOT",
// Need to also check the lower case version of just these three env variables.
"http_proxy",
"https_proxy",
Expand Down

0 comments on commit 2712e2e

Please sign in to comment.