Removed all workflows and updated alpine version

This commit is contained in:
Muhamad Aditya Prima 2024-12-18 02:58:29 +07:00
parent bf2b0b0363
commit 8846c3f976
5 changed files with 41 additions and 513 deletions

View File

@ -1,82 +0,0 @@
name: Build and Push Alpine NodeJS Image to docker.io Registry
on:
push:
branches:
- master
jobs:
build:
name: Build and push nodejs alpine based to docker.io
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
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.14
push: true
tags: |
aprimediet/nodejs:14.21.3-alpine
aprimediet/nodejs:14-alpine
- name: Build and push 16.20.2
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.16
push: true
tags: |
aprimediet/nodejs:16.20.2-alpine
aprimediet/nodejs:16-alpine
- name: Build and push 18.19.1
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.18
push: true
tags: |
aprimediet/nodejs:18.19.1-alpine
aprimediet/nodejs:18-alpine
- name: Build and push 20.15.1
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.20
push: true
tags: |
aprimediet/nodejs:20.15.1-alpine
aprimediet/nodejs:20-alpine
- name: Build and push 22.11.0
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=aprimediet
ALPINE_VERSION=3.21
push: true
tags: |
aprimediet/nodejs:22.11.1-alpine
aprimediet/nodejs:22-alpine
aprimediet/nodejs:alpine

View File

@ -1,82 +0,0 @@
name: Build and Push Alpine NodeJS Image to Winter Access Registry
on:
push:
branches:
- master
jobs:
build:
name: Build and push nodejs alpine based to git.winteraccess.id
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 Winter Access Git Registry
uses: docker/login-action@v3
with:
registry: git.winteraccess.id
username: ${{ vars.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push 14.21.3
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=git.winteraccess.id/docker
ALPINE_VERSION=3.14
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:14.21.3-alpine
git.winteraccess.id/${{ gitea.repository }}:14-alpine
- name: Build and push 16.20.2
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=git.winteraccess.id/docker
ALPINE_VERSION=3.16
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:16.20.2-alpine
git.winteraccess.id/${{ gitea.repository }}:16-alpine
- name: Build and push 18.19.1
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=git.winteraccess.id/docker
ALPINE_VERSION=3.18
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:18.19.1-alpine
git.winteraccess.id/${{ gitea.repository }}:18-alpine
- name: Build and push 20.15.1
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=git.winteraccess.id/docker
ALPINE_VERSION=3.20
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:20.15.1-alpine
git.winteraccess.id/${{ gitea.repository }}:20-alpine
- name: Build and push 22.11.1
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.alpine
build-args: |
REGISTRY_URL=git.winteraccess.id/docker
ALPINE_VERSION=3.21
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:22.11.1-alpine
git.winteraccess.id/${{ gitea.repository }}:22-alpine
git.winteraccess.id/${{ gitea.repository }}:alpine

View File

@ -1,159 +0,0 @@
name: Build and Push UBI9 NodeJS Image to docker.io Registry
on:
push:
branches:
- master
jobs:
build:
name: Build and push nodejs ubi9 based to docker.io
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.ubi9
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=14.21.3
push: true
tags: |
aprimediet/nodejs:14.21.3-ubi9
aprimediet/nodejs:14-ubi9
- name: Build and push 16.20.2
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=16.20.2
push: true
tags: |
aprimediet/nodejs:16.20.2-ubi9
aprimediet/nodejs:16-ubi9
- name: Build and push 18.20.5
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=18.20.5
push: true
tags: |
aprimediet/nodejs:18.20.5-ubi9
aprimediet/nodejs:18-ubi9
- name: Build and push 20.18.0
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=20.18.0
push: true
tags: |
aprimediet/nodejs:20.18.0-ubi9
aprimediet/nodejs:20-ubi9
- name: Build and push 22.12.0
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=22.12.0
push: true
tags: |
aprimediet/nodejs:22.12.0-ubi9
aprimediet/nodejs:22-ubi9
aprimediet/nodejs:ubi9
build-micro:
name: Build and push nodejs ubi9-micro based to docker.io
runs-on: ubuntu-latest
needs:
- build
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.ubi9-micro
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=14.21.3
push: true
tags: |
aprimediet/nodejs:14.21.3-ubi9-micro
aprimediet/nodejs:14-ubi9-micro
- name: Build and push 16.20.2
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9-micro
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=16.20.2
push: true
tags: |
aprimediet/nodejs:16.20.2-ubi9-micro
aprimediet/nodejs:16-ubi9-micro
- name: Build and push 18.20.5
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9-micro
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=18.20.5
push: true
tags: |
aprimediet/nodejs:18.20.5-ubi9-micro
aprimediet/nodejs:18-ubi9-micro
- name: Build and push 20.18.0
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9-micro
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=20.18.0
push: true
tags: |
aprimediet/nodejs:20.18.0-ubi9-micro
aprimediet/nodejs:20-ubi9-micro
- name: Build and push 22.12.0
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9-micro
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=22.12.0
push: true
tags: |
aprimediet/nodejs:22.12.0-ubi9-micro
aprimediet/nodejs:22-ubi9-micro
aprimediet/nodejs:ubi9-micro

View File

@ -1,159 +0,0 @@
name: Build and Push UBI9 NodeJS Image to git.winteraccess.id Registry
on:
push:
branches:
- master
jobs:
build:
name: Build and push nodejs ubi9 based to git.winteraccess.id
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 git.winteraccess.id Registry
uses: docker/login-action@v3
with:
registry: git.winteraccess.id
username: ${{ vars.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push 14.21.3
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=14.21.3
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:14.21.3-ubi9
git.winteraccess.id/${{ gitea.repository }}:14-ubi9
- name: Build and push 16.20.2
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=16.20.2
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:16.20.2-ubi9
git.winteraccess.id/${{ gitea.repository }}:16-ubi9
- name: Build and push 18.20.5
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=18.20.5
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:18.20.5-ubi9
git.winteraccess.id/${{ gitea.repository }}:18-ubi9
- name: Build and push 20.18.0
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=20.18.0
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:20.18.0-ubi9
git.winteraccess.id/${{ gitea.repository }}:20-ubi9
- name: Build and push 22.12.0
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=22.12.0
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:22.12.0-ubi9
git.winteraccess.id/${{ gitea.repository }}:22-ubi9
git.winteraccess.id/${{ gitea.repository }}:ubi9
build-micro:
name: Build and push nodejs ubi9-micro based to git.winteraccess.id
runs-on: ubuntu-latest
needs:
- build
container:
image: ghcr.io/catthehacker/ubuntu:act-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Login to git.winteraccess.id Registry
uses: docker/login-action@v3
with:
registry: git.winteraccess.id
username: ${{ vars.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push 14.21.3
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9-micro
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=14.21.3
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:14.21.3-ubi9-micro
git.winteraccess.id/${{ gitea.repository }}:14-ubi9-micro
- name: Build and push 16.20.2
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9-micro
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=16.20.2
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:16.20.2-ubi9-micro
git.winteraccess.id/${{ gitea.repository }}:16-ubi9-micro
- name: Build and push 18.20.5
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9-micro
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=18.20.5
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:18.20.5-ubi9-micro
git.winteraccess.id/${{ gitea.repository }}:18-ubi9-micro
- name: Build and push 20.18.0
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9-micro
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=20.18.0
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:20.18.0-ubi9-micro
git.winteraccess.id/${{ gitea.repository }}:20-ubi9-micro
- name: Build and push 22.12.0
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.ubi9-micro
build-args: |
NVM_VERSION=0.40.1
NODE_VERSION=22.12.0
push: true
tags: |
git.winteraccess.id/${{ gitea.repository }}:22.12.0-ubi9-micro
git.winteraccess.id/${{ gitea.repository }}:22-ubi9-micro
git.winteraccess.id/${{ gitea.repository }}:ubi9-micro

View File

@ -4,50 +4,60 @@
# 20.11.1 = 3.19 # 20.11.1 = 3.19
# 20.15.1 = 3.20 # 20.15.1 = 3.20
# 22.11.0 = 3.21 # 22.11.0 = 3.21
ARG REGISTRY_URL=docker.io/aprimediet ARG OS_VERSION=3.21
ARG ALPINE_VERSION=3.21
FROM ${REGISTRY_URL}/alpine:${ALPINE_VERSION} FROM quay.io/sindigilive/alpine:${OS_VERSION} AS builder
LABEL maintainer="<Muhamad Aditya Prima> aprimediet@gmail.com"
USER root USER root
WORKDIR /tmp WORKDIR /tmp
# Set Cache Directory # Add nginx user and group and install required nvm installer
ENV NODE_DIR=/usr/local/share/nodejs RUN /sbin/apk add --update --no-cache \
ENV NPM_CACHE_DIR=${NODE_DIR}/.npm-cache nodejs nodejs-dev npm ;
ENV YARN_CACHE_DIR=${NODE_DIR}/.yarn-cache
RUN addgroup -g 10001 nodejs && \ FROM scratch
adduser -D -u 10001 -G nodejs -s /bin/sh -h /app nodejs
# INSTALL WGET AND REQUIRED BUILD TOOLS ARG NODE_VERSION=22.11.0
RUN --mount=type=cache,target=/var/cache/apk \ ARG NODE_VER_SHORT=22
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 ENV NODE_VERSION=${NODE_VERSION}
RUN --mount=type=cache,target=${NPM_CACHE_DIR} \ ENV NODE_VER_SHORT=${NODE_VER_SHORT}
npm i -g yarn ENV APP_ROOT_DIR=/app
ENV APP_DIR=${APP_ROOT_DIR}/htdocs
ENV NPM_CACHE_DIR=${APP_ROOT_DIR}/.npm-cache
ENV YARN_CACHE_DIR=${APP_ROOT_DIR}/.yarn-cache
# CREATE YARN CACHE DIR LABEL maintainer="Muhamad Aditya Prima <map@sindigilive.com>"
RUN mkdir -p ${YARN_CACHE_DIR} LABEL name="nginx"
LABEL version="${NODE_VERSION}"
LABEL distribution-scope="public"
# SET YARN CACHE DIR #labels for container catalog
RUN yarn config set cache-folder ${YARN_CACHE_DIR} LABEL summary="Nginx ${NODE_VERSION} on alpine based container image"
LABEL description="Provide nginx on alpine based container base image"
LABEL io.k8s.description="Very small alpine linux container image"
LABEL io.k8s.display-name="Nginx ${NODE_VERSION}"
# CLEAR CACHE COPY --from=builder / /
RUN apk del curl && \
rm -rf /var/cache/apk/* && \ # Setup user and directories
npm cache clean --force && \ RUN /bin/mkdir -p ${APP_DIR} ${NPM_CACHE_DIR} ${YARN_CACHE_DIR} ; \
npm -g cache clean --force /usr/sbin/addgroup -g 10001 nodejs ; \
/usr/sbin/adduser -D -u 10001 -G nodejs -s /sbin/nologin -h ${APP_ROOT_DIR} nodejs ; \
/bin/chown -R nodejs:nodejs ${APP_ROOT_DIR} ; \
/usr/sbin/addgroup -g 10001 nodejs ; \
/usr/sbin/adduser -D -u 10001 -G nodejs -s /sbin/nologin -h ${APP_DIR} nodejs ; \
/usr/bin/npm -g config set cache ${NPM_CACHE_DIR} ; \
/usr/bin/npm config set cache ${NPM_CACHE_DIR} ; \
/usr/bin/npm i -g yarn ; \
/usr/local/bin/yarn config set cache-folder ${YARN_CACHE_DIR} ; \
/bin/rm -rf /var/cache/apk/* ; \
/usr/bin/npm cache clean --force ; \
/usr/bin/npm -g cache clean --force ;
USER nodejs USER nodejs
WORKDIR /app WORKDIR ${APP_DIR}
CMD ["node"] CMD ["/usr/bin/node", "-v"]