Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: go in docker failing #1989

Merged
merged 5 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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