From e6182b5cc5a34ac4d5f6a2261fdac485a9a306ef Mon Sep 17 00:00:00 2001 From: Aditya Prima Date: Tue, 1 Oct 2024 22:41:10 +0700 Subject: [PATCH] Removed rootless image --- .gitea/workflows/alpine-dockerio.yaml | 60 ----------------------- .gitea/workflows/alpine-winter.yaml | 56 ---------------------- .gitea/workflows/ubuntu-dockerio.yaml | 68 --------------------------- .gitea/workflows/ubuntu-winter.yaml | 64 ------------------------- Dockerfile.alpine-rootless | 49 ------------------- Dockerfile.ubuntu-rootless | 59 ----------------------- 6 files changed, 356 deletions(-) delete mode 100644 Dockerfile.alpine-rootless delete mode 100644 Dockerfile.ubuntu-rootless diff --git a/.gitea/workflows/alpine-dockerio.yaml b/.gitea/workflows/alpine-dockerio.yaml index 940d386..fc96ba0 100644 --- a/.gitea/workflows/alpine-dockerio.yaml +++ b/.gitea/workflows/alpine-dockerio.yaml @@ -65,63 +65,3 @@ jobs: aprimediet/nodejs:20-alpine aprimediet/nodejs:latest-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 diff --git a/.gitea/workflows/alpine-winter.yaml b/.gitea/workflows/alpine-winter.yaml index a8f77ba..8689386 100644 --- a/.gitea/workflows/alpine-winter.yaml +++ b/.gitea/workflows/alpine-winter.yaml @@ -61,59 +61,3 @@ jobs: git.winteraccess.id/${{ gitea.repository }}:20-alpine git.winteraccess.id/${{ gitea.repository }}:latest-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 diff --git a/.gitea/workflows/ubuntu-dockerio.yaml b/.gitea/workflows/ubuntu-dockerio.yaml index fbaffdd..e35aebf 100644 --- a/.gitea/workflows/ubuntu-dockerio.yaml +++ b/.gitea/workflows/ubuntu-dockerio.yaml @@ -73,71 +73,3 @@ jobs: aprimediet/nodejs:20 aprimediet/nodejs:latest-ubuntu 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 diff --git a/.gitea/workflows/ubuntu-winter.yaml b/.gitea/workflows/ubuntu-winter.yaml index dc710b6..b9180e5 100644 --- a/.gitea/workflows/ubuntu-winter.yaml +++ b/.gitea/workflows/ubuntu-winter.yaml @@ -69,67 +69,3 @@ jobs: git.winteraccess.id/${{ gitea.repository }}:20 git.winteraccess.id/${{ gitea.repository }}:latest-ubuntu 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 diff --git a/Dockerfile.alpine-rootless b/Dockerfile.alpine-rootless deleted file mode 100644 index f29de98..0000000 --- a/Dockerfile.alpine-rootless +++ /dev/null @@ -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=" 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 \ No newline at end of file diff --git a/Dockerfile.ubuntu-rootless b/Dockerfile.ubuntu-rootless deleted file mode 100644 index 72d8bc5..0000000 --- a/Dockerfile.ubuntu-rootless +++ /dev/null @@ -1,59 +0,0 @@ -ARG REGISTRY_URL=git.winteraccess.id/docker -ARG UBUNTU_VERSION=noble - -FROM ${REGISTRY_URL}/ubuntu:${UBUNTU_VERSION} -LABEL maintainer=" 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