Removed rootless image
Build and Push Alpine NodeJS Image to docker.io Registry / Build and push image (root user) (push) Successful in 3m58s
Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (Root User) (push) Successful in 55s
Details
Build and Push Ubuntu NodeJS Image to docker.io Registry / Build and push image (root user) (push) Successful in 23m42s
Details
Build and Push Ubuntu NodeJS Image to Winter Access Registry / Build and push image (root user) (push) Successful in 3m30s
Details
Build and Push Alpine NodeJS Image to docker.io Registry / Build and push image (root user) (push) Successful in 3m58s
Details
Build and Push Alpine NodeJS Image to Winter Access Registry / Build and push image (Root User) (push) Successful in 55s
Details
Build and Push Ubuntu NodeJS Image to docker.io Registry / Build and push image (root user) (push) Successful in 23m42s
Details
Build and Push Ubuntu NodeJS Image to Winter Access Registry / Build and push image (root user) (push) Successful in 3m30s
Details
This commit is contained in:
parent
d7f2a41fb7
commit
e6182b5cc5
|
@ -65,63 +65,3 @@ jobs:
|
||||||
aprimediet/nodejs:20-alpine
|
aprimediet/nodejs:20-alpine
|
||||||
aprimediet/nodejs:latest-alpine
|
aprimediet/nodejs:latest-alpine
|
||||||
aprimediet/nodejs:alpine
|
aprimediet/nodejs:alpine
|
||||||
build-rootless:
|
|
||||||
name: Build and push image (rootless)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Login to docker.io Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: docker.io
|
|
||||||
username: aprimediet
|
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
|
||||||
- name: Build and push 14.21.3
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.alpine-rootless
|
|
||||||
build-args: |
|
|
||||||
REGISTRY_URL=aprimediet
|
|
||||||
ALPINE_VERSION=3.14
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
aprimediet/nodejs:14-rootless-alpine
|
|
||||||
- name: Build and push 16.20.2
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.alpine-rootless
|
|
||||||
build-args: |
|
|
||||||
REGISTRY_URL=aprimediet
|
|
||||||
ALPINE_VERSION=3.16
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
aprimediet/nodejs:16-rootless-alpine
|
|
||||||
- name: Build and push 18.19.1
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.alpine-rootless
|
|
||||||
build-args: |
|
|
||||||
REGISTRY_URL=aprimediet
|
|
||||||
ALPINE_VERSION=3.18
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
aprimediet/nodejs:18-rootless-alpine
|
|
||||||
- name: Build and push 20.15.1
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.alpine-rootless
|
|
||||||
build-args: |
|
|
||||||
REGISTRY_URL=aprimediet
|
|
||||||
ALPINE_VERSION=3.20
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
aprimediet/nodejs:20-rootless-alpine
|
|
||||||
aprimediet/nodejs:latest-rootless-alpine
|
|
||||||
aprimediet/nodejs:rootless-alpine
|
|
||||||
|
|
|
@ -61,59 +61,3 @@ jobs:
|
||||||
git.winteraccess.id/${{ gitea.repository }}:20-alpine
|
git.winteraccess.id/${{ gitea.repository }}:20-alpine
|
||||||
git.winteraccess.id/${{ gitea.repository }}:latest-alpine
|
git.winteraccess.id/${{ gitea.repository }}:latest-alpine
|
||||||
git.winteraccess.id/${{ gitea.repository }}:alpine
|
git.winteraccess.id/${{ gitea.repository }}:alpine
|
||||||
build-rootless:
|
|
||||||
name: Build and push image (rootless)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Login to Docker Winter Access Git Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: git.winteraccess.id
|
|
||||||
username: aditya.prima
|
|
||||||
password: ${{ secrets.PATOKEN }}
|
|
||||||
- name: Build and push 14.21.3
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.alpine-rootless
|
|
||||||
build-args: |
|
|
||||||
ALPINE_VERSION=3.14
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:14-rootless-alpine
|
|
||||||
- name: Build and push 16.20.2
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.alpine-rootless
|
|
||||||
build-args: |
|
|
||||||
ALPINE_VERSION=3.16
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:16-rootless-alpine
|
|
||||||
- name: Build and push 18.19.1
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.alpine-rootless
|
|
||||||
build-args: |
|
|
||||||
ALPINE_VERSION=3.18
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:18-rootless-alpine
|
|
||||||
- name: Build and push 20.15.1
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.alpine-rootless
|
|
||||||
build-args: |
|
|
||||||
ALPINE_VERSION=3.20
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:20-rootless-alpine
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:latest-rootless-alpine
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:rootless-alpine
|
|
||||||
|
|
|
@ -73,71 +73,3 @@ jobs:
|
||||||
aprimediet/nodejs:20
|
aprimediet/nodejs:20
|
||||||
aprimediet/nodejs:latest-ubuntu
|
aprimediet/nodejs:latest-ubuntu
|
||||||
aprimediet/nodejs:latest
|
aprimediet/nodejs:latest
|
||||||
build-rootless:
|
|
||||||
name: Build and push image (rootless)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Login to docker.io Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: docker.io
|
|
||||||
username: aprimediet
|
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
|
||||||
- name: Build and push 14.21.3
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.ubuntu-rootless
|
|
||||||
build-args: |
|
|
||||||
REGISTRY_URL=aprimediet
|
|
||||||
UBUNTU_VERSION=noble
|
|
||||||
NODE_VERSION=14.21.3
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
aprimediet/nodejs:14-rootless-ubuntu
|
|
||||||
aprimediet/nodejs:14-rootless
|
|
||||||
- name: Build and push 16.20.2
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.ubuntu-rootless
|
|
||||||
build-args: |
|
|
||||||
REGISTRY_URL=aprimediet
|
|
||||||
UBUNTU_VERSION=noble
|
|
||||||
NODE_VERSION=16.20.2
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
aprimediet/nodejs:16-rootless-ubuntu
|
|
||||||
aprimediet/nodejs:16-rootless
|
|
||||||
- name: Build and push 18.19.1
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.ubuntu-rootless
|
|
||||||
build-args: |
|
|
||||||
REGISTRY_URL=aprimediet
|
|
||||||
UBUNTU_VERSION=noble
|
|
||||||
NODE_VERSION=18.19.1
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
aprimediet/nodejs:18-rootless-ubuntu
|
|
||||||
aprimediet/nodejs:18-rootless
|
|
||||||
- name: Build and push 20.15.1
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.ubuntu-rootless
|
|
||||||
build-args: |
|
|
||||||
REGISTRY_URL=aprimediet
|
|
||||||
UBUNTU_VERSION=noble
|
|
||||||
NODE_VERSION=20.15.1
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
aprimediet/nodejs:20-rootless-ubuntu
|
|
||||||
aprimediet/nodejs:20-rootless
|
|
||||||
aprimediet/nodejs:latest-rootless-ubuntu
|
|
||||||
aprimediet/nodejs:latest-rootless
|
|
||||||
|
|
|
@ -69,67 +69,3 @@ jobs:
|
||||||
git.winteraccess.id/${{ gitea.repository }}:20
|
git.winteraccess.id/${{ gitea.repository }}:20
|
||||||
git.winteraccess.id/${{ gitea.repository }}:latest-ubuntu
|
git.winteraccess.id/${{ gitea.repository }}:latest-ubuntu
|
||||||
git.winteraccess.id/${{ gitea.repository }}:latest
|
git.winteraccess.id/${{ gitea.repository }}:latest
|
||||||
build-rootless:
|
|
||||||
name: Build and push image (rootless)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Login to Docker Winter Access Git Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: git.winteraccess.id
|
|
||||||
username: aditya.prima
|
|
||||||
password: ${{ secrets.PATOKEN }}
|
|
||||||
- name: Build and push 14.21.3
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.ubuntu-rootless
|
|
||||||
build-args: |
|
|
||||||
UBUNTU_VERSION=noble
|
|
||||||
NODE_VERSION=14.21.3
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:14-rootless-ubuntu
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:14-rootless
|
|
||||||
- name: Build and push 16.20.2
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.ubuntu-rootless
|
|
||||||
build-args: |
|
|
||||||
UBUNTU_VERSION=noble
|
|
||||||
NODE_VERSION=16.20.2
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:16-rootless-ubuntu
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:16-rootless
|
|
||||||
- name: Build and push 18.19.1
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.ubuntu-rootless
|
|
||||||
build-args: |
|
|
||||||
UBUNTU_VERSION=noble
|
|
||||||
NODE_VERSION=18.19.1
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:18-rootless-ubuntu
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:18-rootless
|
|
||||||
- name: Build and push 20.15.1
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile.ubuntu-rootless
|
|
||||||
build-args: |
|
|
||||||
UBUNTU_VERSION=noble
|
|
||||||
NODE_VERSION=20.15.1
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:20-rootless-ubuntu
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:20-rootless
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:latest-rootless-ubuntu
|
|
||||||
git.winteraccess.id/${{ gitea.repository }}:latest-rootless
|
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
# 14.21.3 = 3.14
|
|
||||||
# 16.20.2 = 3.16
|
|
||||||
# 18.19.1 = 3.18
|
|
||||||
# 20.11.1 = 3.19
|
|
||||||
# 20.15.1 = 3.20
|
|
||||||
ARG REGISTRY_URL=git.winteraccess.id/docker
|
|
||||||
ARG ALPINE_VERSION=3.20
|
|
||||||
|
|
||||||
FROM ${REGISTRY_URL}/alpine:${ALPINE_VERSION}
|
|
||||||
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
|
|
||||||
# ADD USER
|
|
||||||
RUN addgroup -g 1001 node && adduser -D -u 1001 -G node -s /bin/bash -h /app node
|
|
||||||
|
|
||||||
# SET CACHE DIR
|
|
||||||
ENV NODE_DIR=/usr/local/share/nodejs
|
|
||||||
ENV NPM_CACHE_DIR=${NODE_DIR}/.npm-cache
|
|
||||||
ENV YARN_CACHE_DIR=${NODE_DIR}/.yarn-cache
|
|
||||||
|
|
||||||
# INSTALL WGET AND REQUIRED BUILD TOOLS
|
|
||||||
RUN --mount=type=cache,target=/var/cache/apk \
|
|
||||||
apk update && apk upgrade && apk add \
|
|
||||||
nodejs nodejs-dev npm
|
|
||||||
|
|
||||||
# SET NPM GLOBAL CACHE
|
|
||||||
RUN npm -g config set cache ${NPM_CACHE_DIR} && \
|
|
||||||
npm config set cache ${NPM_CACHE_DIR}
|
|
||||||
|
|
||||||
# INSTALL YARN
|
|
||||||
RUN --mount=type=cache,target=${NPM_CACHE_DIR} \
|
|
||||||
npm i -g yarn
|
|
||||||
|
|
||||||
# CREATE YARN CACHE DIR
|
|
||||||
RUN mkdir -p ${YARN_CACHE_DIR}
|
|
||||||
|
|
||||||
# SET YARN CACHE DIR
|
|
||||||
RUN yarn config set cache-folder ${YARN_CACHE_DIR}
|
|
||||||
|
|
||||||
# CLEAR CACHE
|
|
||||||
RUN apk del curl && \
|
|
||||||
rm -rf /var/cache/apk/* && \
|
|
||||||
npm cache clean --force && \
|
|
||||||
npm -g cache clean --force
|
|
||||||
|
|
||||||
# SET AS USER NODE
|
|
||||||
WORKDIR /app
|
|
||||||
USER node
|
|
|
@ -1,59 +0,0 @@
|
||||||
ARG REGISTRY_URL=git.winteraccess.id/docker
|
|
||||||
ARG UBUNTU_VERSION=noble
|
|
||||||
|
|
||||||
FROM ${REGISTRY_URL}/ubuntu:${UBUNTU_VERSION}
|
|
||||||
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
|
|
||||||
|
|
||||||
ARG NVM_VERSION=0.39.7
|
|
||||||
ARG NODE_VERSION=20.15.1
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
|
|
||||||
# ADDUSER
|
|
||||||
RUN groupadd -g 1001 node && useradd -u 1001 -s /bin/bash -m -d /app -g node node
|
|
||||||
|
|
||||||
# CREATE NVM_DIR
|
|
||||||
ENV NVM_DIR=/usr/local/share/nvm
|
|
||||||
ENV NPM_CACHE_DIR=${NVM_DIR}/.npm-cache
|
|
||||||
ENV YARN_CACHE_DIR=${NVM_DIR}/.yarn-cache
|
|
||||||
RUN mkdir -p ${NVM_DIR}
|
|
||||||
|
|
||||||
# UPGRADE PACKAGES FIRST
|
|
||||||
RUN --mount=type=cache,target=/var/cache/apt/archives \
|
|
||||||
apt -y update && apt -y upgrade
|
|
||||||
|
|
||||||
# GET LATEST NVM
|
|
||||||
ADD https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh /tmp
|
|
||||||
|
|
||||||
# INSTALL NVM AND DESIGNATED NODE VERSION
|
|
||||||
RUN bash /tmp/install.sh && \
|
|
||||||
. $NVM_DIR/nvm.sh && \
|
|
||||||
nvm install v${NODE_VERSION} && \
|
|
||||||
nvm alias default v${NODE_VERSION} && \
|
|
||||||
nvm use default
|
|
||||||
|
|
||||||
ENV NODE_PATH=$NVM_DIR/versions/node/v${NODE_VERSION}/lib/node_modules
|
|
||||||
ENV PATH=$PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
|
|
||||||
|
|
||||||
# SET NPM GLOBAL CACHE
|
|
||||||
RUN npm -g config set cache ${NPM_CACHE_DIR} && \
|
|
||||||
npm config set cache ${NPM_CACHE_DIR}
|
|
||||||
|
|
||||||
# INSTALL YARN
|
|
||||||
RUN --mount=type=cache,target=${NPM_CACHE_DIR} \
|
|
||||||
npm i -g yarn
|
|
||||||
|
|
||||||
# CREATE YARN CACHE DIR
|
|
||||||
RUN mkdir -p ${YARN_CACHE_DIR}
|
|
||||||
|
|
||||||
# SET YARN CACHE DIR
|
|
||||||
RUN yarn config set cache-folder ${YARN_CACHE_DIR}
|
|
||||||
|
|
||||||
# CLEAR APT CACHE
|
|
||||||
RUN apt -y remove curl && apt -y autoremove && \
|
|
||||||
apt -y clean && rm -rf /tmp/* && \
|
|
||||||
npm cache clean --force && npm -g cache clean --force
|
|
||||||
|
|
||||||
# SET AS USER node
|
|
||||||
WORKDIR /app
|
|
||||||
USER node
|
|
Loading…
Reference in New Issue