Initial Commit
Build and Push Ubuntu Image / Build and push image (push) Successful in 1m4s
Details
Build and Push Ubuntu Image / Build and push image (push) Successful in 1m4s
Details
This commit is contained in:
parent
473b945468
commit
19f62c6621
|
@ -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
|
|
@ -0,0 +1,29 @@
|
||||||
|
ARG UBUNTU_VERSION=jammy
|
||||||
|
|
||||||
|
FROM ubuntu:${UBUNTU_VERSION} AS base
|
||||||
|
LABEL maintainer="<Aditya Prima> 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
|
Loading…
Reference in New Issue