Skip to content

Commit dadd6a9

Browse files
authored
fix: Install Node on agent (#23)
1 parent a0903ef commit dadd6a9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,16 @@ ENV YQ_VERSION="${ENV_YQ_VERSION:-v4.30.6}"
3838
ENV YQ_BINARY="yq_linux_amd64"
3939
RUN wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY}.tar.gz -O - | tar xz && mv ${YQ_BINARY} /usr/bin/yq
4040

41-
FROM deps-yq AS final
41+
FROM deps-yq AS deps-node
42+
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/nodesource.gpg
43+
ENV NODE_MAJOR_VERSION="20"
44+
RUN echo "deb [signed-by=/etc/apt/trusted.gpg.d/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
45+
RUN apt-get update \
46+
&& apt-get -y install nodejs \
47+
&& apt-get clean \
48+
&& rm -rf /var/lib/apt/lists/*
49+
50+
FROM deps-node AS final
4251
COPY ./github-runner-entrypoint.sh ./entrypoint.sh
4352
RUN chmod +x ./entrypoint.sh
4453
USER runner

0 commit comments

Comments
 (0)