diff --git a/Dockerfile b/Dockerfile index 6eef6bc..90d792b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,16 @@ -FROM node:21-bookworm AS build +FROM jenkins/inbound-agent -RUN node -v -WORKDIR /app -COPY . . \ No newline at end of file +USER root + +RUN apt-get update ;\ + apt-get -y install lsb-release procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common + +RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ;\ + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list ;\ + apt-get update ;\ + apt-get -y install docker-ce docker-ce-cli docker-ce-rootless-extras docker-buildx-plugin + +RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ + sudo bash nodesource_setup.sh ;\ + apt-get -y install nodejs +USER jenkins diff --git a/Dockerfile.1 b/Dockerfile.1 new file mode 100644 index 0000000..6eef6bc --- /dev/null +++ b/Dockerfile.1 @@ -0,0 +1,5 @@ +FROM node:21-bookworm AS build + +RUN node -v +WORKDIR /app +COPY . . \ No newline at end of file diff --git a/Dockerfile.inbound b/Dockerfile.inbound deleted file mode 100644 index d211e44..0000000 --- a/Dockerfile.inbound +++ /dev/null @@ -1,15 +0,0 @@ -FROM jenkins/inbound-agent - -USER root - -RUN apt-get update ;\ - apt-get -y install lsb-release procps wget sudo git apt-transport-https ca-certificates curl gnupg2 software-properties-common - -RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ;\ - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list ;\ - apt-get update ;\ - apt-get -y install docker-ce docker-ce-cli docker-ce-rootless-extras docker-buildx-plugin - -RUN sudo curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh ;\ - sudo bash nodesource_setup.sh ;\ - apt-get -y install nodejs \ No newline at end of file