clean docker-ce from base image creation #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
ubuntu_image: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Add repos | |
run: | | |
echo "deb http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list | |
echo "deb http://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list | |
echo "deb http://archive.ubuntu.com/ubuntu noble-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list | |
echo "deb http://security.ubuntu.com/ubuntu noble-security main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list | |
echo "deb http://archive.canonical.com/ubuntu noble partner" | sudo tee -a /etc/apt/sources.list | |
- name: Build Ubuntu docker focal baseimage | |
run: sudo ./baseimage/create-baseimage focal ${{ secrets.REPO }} ${{ secrets.USER }} ${{ secrets.PWD }} | |
- name: Build Ubuntu docker jammy baseimage | |
run: sudo ./baseimage/create-baseimage jammy ${{ secrets.REPO }} ${{ secrets.USER }} ${{ secrets.PWD }} | |
- name: Completed image build | |
run: echo "completed image build" | |
ubuntu_focal_dind: | |
runs-on: ubuntu-24.04 | |
container: | |
image: quay.io/sreejithp/ubuntu:focal-dind-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build Ubuntu focal with dind | |
run: | | |
cd dind/ | |
docker build -f Dockerfile . \ | |
-t ${{ secrets.REPO }}/${{ secrets.USER }}/ubuntu:focal-dind-latest \ | |
--build-arg FROM="quay.io/sreejithp/ubuntu:focal" \ | |
--build-arg UBUNTU_RELEASE=focal | |
- name: Login to Docker registry | |
run: docker login ${{ secrets.REPO }} -u ${{ secrets.USER }} -p ${{ secrets.PWD }} | |
- name: Push image to Docker registry | |
run: docker push ${{ secrets.REPO }}/${{ secrets.USER }}/ubuntu:focal-dind-latest | |
- name: Completed image build | |
run: echo "completed image build" | |
needs: ubuntu_image | |
ubuntu_jammy_dind: | |
runs-on: ubuntu-24.04 | |
container: | |
image: quay.io/sreejithp/ubuntu:jammy-dind-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build Ubuntu jammy with dind | |
run: | | |
cd dind/ | |
docker build -f Dockerfile . \ | |
-t ${{ secrets.REPO }}/${{ secrets.USER }}/ubuntu:jammy-dind-latest \ | |
--build-arg FROM="quay.io/sreejithp/ubuntu:jammy" \ | |
--build-arg UBUNTU_RELEASE=jammy | |
- name: Login to Docker registry | |
run: docker login ${{ secrets.REPO }} -u ${{ secrets.USER }} -p ${{ secrets.PWD }} | |
- name: Push image to Docker registry | |
run: docker push ${{ secrets.REPO }}/${{ secrets.USER }}/ubuntu:jammy-dind-latest | |
- name: Completed image build | |
run: echo "completed image build" | |
needs: ubuntu_image | |
ubuntu_nsenter: | |
runs-on: ubuntu-24.04 | |
container: | |
image: quay.io/sreejithp/ubuntu:jammy-dind-latest | |
env: | |
VERSION: 2.37 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build Ubuntu based nsenter | |
run: | | |
cd nsenter/ | |
docker build -f Dockerfile . --network=host \ | |
-t ${{ secrets.REPO }}/${{ secrets.USER }}/nsenter:latest \ | |
-t ${{ secrets.REPO }}/${{ secrets.USER }}/nsenter:$VERSION \ | |
--build-arg FROM="quay.io/sreejithp/ubuntu:jammy" \ | |
--build-arg TIMEZONE=America/Chicago \ | |
--build-arg UTIL_LINUX_VER=$VERSION \ | |
--build-arg UBUNTU_RELEASE=jammy | |
- name: Login to Docker registry | |
run: docker login ${{ secrets.REPO }} -u ${{ secrets.USER }} -p ${{ secrets.PWD }} | |
- name: Push image to Docker registry | |
run: | | |
docker push ${{ secrets.REPO }}/${{ secrets.USER }}/nsenter:latest | |
docker push ${{ secrets.REPO }}/${{ secrets.USER }}/nsenter:$VERSION | |
- name: Completed image build | |
run: echo "completed image build" | |
needs: ubuntu_jammy_dind | |
alpine_image: | |
runs-on: ubuntu-24.04 | |
container: | |
image: quay.io/sreejithp/ubuntu:jammy-dind-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build Alpine image | |
run: | | |
cd alpine | |
docker build -f Dockerfile . \ | |
-t ${{ secrets.REPO }}/${{ secrets.USER }}/alpine:latest \ | |
-t ${{ secrets.REPO }}/${{ secrets.USER }}/alpine:3.15.4 | |
- name: Login to Docker registry | |
run: docker login ${{ secrets.REPO }} -u ${{ secrets.USER }} -p ${{ secrets.PWD }} | |
- name: Push image to Docker registry | |
run: | | |
docker push ${{ secrets.REPO }}/${{ secrets.USER }}/alpine:latest | |
docker push ${{ secrets.REPO }}/${{ secrets.USER }}/alpine:3.15.4 | |
- name: Completed image build | |
run: echo "completed image build" | |
needs: ubuntu_jammy_dind |