diff --git a/.gitea/workflows/master.yaml b/.gitea/workflows/master.yaml new file mode 100644 index 0000000..f47ccfd --- /dev/null +++ b/.gitea/workflows/master.yaml @@ -0,0 +1,33 @@ +name: Build and Push Ubuntu Image +on: + push: + branches: + - master + +jobs: + build: + name: Build and push image + 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 22.04 / jammy + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + build-args: | + UBUNTU_VERSION=jammy + push: true + tags: | + git.winteraccess.id/${{ gitea.repository }}:22.04 + git.winteraccess.id/${{ gitea.repository }}:jammy + git.winteraccess.id/${{ gitea.repository }}:latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..37f3b20 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +ARG UBUNTU_VERSION=jammy + +FROM ubuntu:${UBUNTU_VERSION} AS base +LABEL maintainer=" aprimediet@gmail.com" + +ARG UBUNTU_VERSION=jammy +# ARG UBUNTU_MIRROR=http://repo.ugm.ac.id/ubuntu +# ARG SECURITY_MIRROR=http://security.ubuntu.com/ubuntu + +ENV DEBIAN_FRONTEND noninteractive +# ADJUST LOCAL TIME +ENV TZ Asia/Jakarta +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +# Set User as root +USER root + +# RUN touch /etc/apt/sources.list +# RUN echo "deb ${UBUNTU_MIRROR}/ ${UBUNTU_VERSION} main restricted universe multiverse" > /etc/apt/sources.list +# RUN echo "deb ${UBUNTU_MIRROR}/ ${UBUNTU_VERSION}-updates main restricted universe multiverse" >> /etc/apt/sources.list +# RUN echo "deb ${UBUNTU_MIRROR}/ ${UBUNTU_VERSION}-backports main restricted universe multiverse" >> /etc/apt/sources.list +# RUN echo "deb ${SECURITY_MIRROR}/ ${UBUNTU_VERSION}-security main restricted universe multiverse" >> /etc/apt/sources.list + +# Install base dependencies +RUN --mount=type=cache,target=/var/cache/apt/archives \ + apt -y update && apt -y upgrade && apt -y install bash curl + +# Clean APT Cache +RUN apt -y clean