Skip to content

Commit

Permalink
fix: Install Node on agent (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krusty93 authored Mar 5, 2024
1 parent a0903ef commit dadd6a9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,16 @@ ENV YQ_VERSION="${ENV_YQ_VERSION:-v4.30.6}"
ENV YQ_BINARY="yq_linux_amd64"
RUN wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY}.tar.gz -O - | tar xz && mv ${YQ_BINARY} /usr/bin/yq

FROM deps-yq AS final
FROM deps-yq AS deps-node
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/nodesource.gpg
ENV NODE_MAJOR_VERSION="20"
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
RUN apt-get update \
&& apt-get -y install nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

FROM deps-node AS final
COPY ./github-runner-entrypoint.sh ./entrypoint.sh
RUN chmod +x ./entrypoint.sh
USER runner
Expand Down

0 comments on commit dadd6a9

Please sign in to comment.