Skip to content

Commit 67ca713

Browse files
committed
fix: upgrade Go to 1.23 and Node to 20 LTS in Dockerfile
Debian bookworm ships Go 1.19 and Node 18 which are too old for most projects in the dataset. Install Go 1.23.6 from official tarball and Node 20 via NodeSource. Add /usr/local/go/bin to agent PATH and set GOPATH.
1 parent 8d15472 commit 67ca713

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616
ca-certificates git curl wget unzip libssl3 libssl-dev pkg-config sudo \
1717
python3 python3-pip python3-venv python3-dev \
1818
build-essential gcc g++ make cmake autoconf automake libtool \
19-
nodejs npm \
20-
golang-go \
2119
default-jdk maven gradle \
2220
ruby ruby-dev \
2321
libffi-dev libxml2-dev libxslt1-dev zlib1g-dev libyaml-dev \
@@ -26,10 +24,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2624
imagemagick libmagickwand-dev \
2725
jq \
2826
&& ln -sf /usr/bin/python3 /usr/bin/python \
27+
&& rm -rf /var/lib/apt/lists/*
28+
29+
# Install Go 1.23 (Debian bookworm ships 1.19 which is too old for most projects)
30+
RUN curl -fsSL https://go.dev/dl/go1.23.6.linux-amd64.tar.gz | tar -C /usr/local -xz
31+
ENV PATH="/usr/local/go/bin:${PATH}"
32+
33+
# Install Node.js 20 LTS via NodeSource (Debian bookworm ships Node 18)
34+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
35+
&& apt-get install -y --no-install-recommends nodejs \
2936
&& npm install -g corepack yarn pnpm \
3037
&& corepack enable \
31-
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
3238
&& rm -rf /var/lib/apt/lists/*
39+
40+
# Install Rust toolchain
41+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
3342
ENV PATH="/root/.cargo/bin:${PATH}"
3443

3544
# Create non-root 'agent' user to run the executor and all agent code.
@@ -46,7 +55,8 @@ RUN mkdir -p /tmp/sessions && chown agent:agent /tmp/sessions
4655

4756
USER agent
4857
ENV HOME=/home/agent
49-
ENV PATH="/home/agent/.cargo/bin:/home/agent/.local/bin:${PATH}"
58+
ENV PATH="/home/agent/.cargo/bin:/home/agent/.local/bin:/usr/local/go/bin:${PATH}"
59+
ENV GOPATH="/home/agent/go"
5060
ENV IMAGE_NAME=platformnetwork/term-executor
5161
ENV IMAGE_DIGEST=""
5262
EXPOSE 8080

0 commit comments

Comments
 (0)