Skip to content

Commit f98298d

Browse files
committed
Simplify stuff
1 parent afaf4dc commit f98298d

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

images/build/go-runner/Dockerfile

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,24 @@ WORKDIR /workspace
2020

2121
# Install dependencies for building Go from source
2222
RUN apt-get update && apt-get install -y \
23-
build-essential \
2423
curl \
25-
git \
2624
ca-certificates \
2725
&& rm -rf /var/lib/apt/lists/*
2826

2927
# Download and build Go from source
3028
ARG GO_VERSION
3129

3230
ARG TARGETARCH
33-
RUN echo "Determining bootstrap Go version for ${GO_VERSION}" && \
34-
BOOTSTRAP_GO_VERSION=$(curl -fsSL "https://raw.githubusercontent.com/golang/go/go${GO_VERSION}/src/make.bash" | grep "^bootgo=" | cut -d= -f2) && \
35-
echo "Installing bootstrap Go version: ${BOOTSTRAP_GO_VERSION} (${TARGETARCH})" && \
31+
RUN echo "Installing Go version: ${GO_VERSION} (${TARGETARCH})" && \
3632
GO_ARCH="${TARGETARCH}"; \
3733
if [ "${TARGETARCH}" = "arm" ]; then GO_ARCH="armv6l"; fi && \
38-
curl -fsSL "https://go.dev/dl/go${BOOTSTRAP_GO_VERSION}.linux-${GO_ARCH}.tar.gz" -o /tmp/go-bootstrap.tar.gz && \
39-
tar -xzf /tmp/go-bootstrap.tar.gz -C /usr/local && \
40-
mv /usr/local/go /usr/local/go-bootstrap && \
41-
rm /tmp/go-bootstrap.tar.gz
42-
43-
# Download Go source
44-
RUN echo "Downloading Go source version: ${GO_VERSION}" && \
45-
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.src.tar.gz" -o /tmp/go.src.tar.gz && \
46-
tar -xzf /tmp/go.src.tar.gz -C /usr/local && \
47-
rm /tmp/go.src.tar.gz
48-
49-
# Build Go from source with bootstrap
50-
WORKDIR /usr/local/go/src
51-
ENV GOROOT_BOOTSTRAP=/usr/local/go-bootstrap
52-
RUN ./make.bash
34+
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz" -o /tmp/go.tar.gz && \
35+
tar -xzf /tmp/go.tar.gz -C /usr/local && \
36+
rm /tmp/go.tar.gz
5337

5438
# Set up Go environment
5539
ENV PATH=/usr/local/go/bin:$PATH
5640
ENV GOROOT=/usr/local/go
57-
ENV GOPATH=/workspace/gopath
5841

5942
# Copy the sources
6043
WORKDIR /workspace

0 commit comments

Comments
 (0)