From 9caad0f39647eb90d59fb311ba2ed66350a7723e Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Wed, 6 Mar 2024 11:22:41 -0500 Subject: [PATCH] Clean up docker build --- .github/workflows/docker.yml | 32 ++++++++++++++++++++++++++++++-- Dockerfile | 29 +++++++++++++++++------------ 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 07cc71c..deb3356 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,7 +9,35 @@ env: IMAGE_NAME: ewpratten/base jobs: - build: + build_x64: + name: Build x64 + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: ewpratten/base:latest + + build_arm64: + name: Build ARM64 runs-on: ubuntu-latest steps: @@ -34,6 +62,6 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true tags: ewpratten/base:latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 2dc6a10..18fa04f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,18 +5,23 @@ RUN echo "max_parallel_downloads=10" >> /etc/dnf/dnf.conf RUN echo "fastestmirror=true" >> /etc/dnf/dnf.conf RUN dnf -y update -# Core system utils -RUN dnf install -y procps-ng - -# Install basic packages -RUN dnf install -y git zsh neovim htop wget curl - -# Python -RUN dnf install -y python3 python3-pip - -# Networking tools -RUN dnf install -y iproute iputils bind-utils -RUN dnf install -y tcpdump mtr netcat +# Install utilities +RUN dnf install -y \ + procps-ng \ + git \ + zsh \ + neovim \ + htop \ + wget \ + curl \ + python3 \ + python3-pip \ + iproute \ + iputils \ + bind-utils \ + tcpdump \ + mtr \ + netcat # Copy this repo into the container COPY . /tmp/ewconfig