-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vlad Volkov
committed
May 16, 2023
1 parent
1c52c5b
commit 7fdac90
Showing
1 changed file
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
# syntax docker/dockerfile:latest | ||
ARG nodejs_version=18 | ||
ARG pulumi_version="3.67.1" | ||
FROM pulumi/pulumi:${pulumi_version} AS pulumi | ||
FROM summerwind/actions-runner-dind:ubuntu-22.04 AS base | ||
USER runner | ||
|
||
|
||
ARG nodejs_version="18.16.0" | ||
FROM base AS build | ||
LABEL org.opencontainers.image.authors="BN Enginseers <[email protected]>" \ | ||
org.opencontainers.image.url="https://github.com/bn-digital/docker" \ | ||
|
@@ -11,9 +15,12 @@ LABEL org.opencontainers.image.authors="BN Enginseers <[email protected]>" \ | |
org.opencontainers.image.title="NodeJS DinD Build Pack for Github Workflows" \ | ||
org.opencontainers.image.description="Base environment used for building NodeJS applications in Docker with Github Action runner" | ||
USER root | ||
COPY --from=pulumi /usr/local/aws-cli/v2/current /home/runner/.local/aws | ||
COPY --from=pulumi /usr/bin/pulumi /home/runner/.local/bin/pulumi | ||
COPY --from=pulumi /usr/bin/kubectl /home/runner/.local/bin/kubectl | ||
RUN apt-get update --fix-missing \ | ||
&& apt-get upgrade --yes \ | ||
&& apt-get dist-upgrade --yes \ | ||
&& apt-get full-upgrade --yes \ | ||
&& apt-get install --no-install-recommends --no-install-suggests --yes \ | ||
apt-transport-https \ | ||
bash \ | ||
|
@@ -29,12 +36,13 @@ RUN apt-get update --fix-missing \ | |
wget \ | ||
&& curl -fsSL https://deb.nodesource.com/setup_${nodejs_version}.x | bash - \ | ||
&& apt-get update \ | ||
&& apt-get install --yes nodejs \ | ||
&& npm install --global yarn npm \ | ||
&& apt-get install --yes nodejs npm \ | ||
&& npm install --global yarn \ | ||
&& apt-get clean \ | ||
&& apt-get autoremove \ | ||
&& rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/* /requirements.apt | ||
&& rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/* /requirements.apt \ | ||
&& ln -s /home/runner/.local/aws/bin/aws /home/runner/.local/bin/aws | ||
|
||
FROM base | ||
USER runner | ||
COPY --from=build / / | ||
COPY --from=build --chown=runner /home/runner /home/runner |