From b00a9cafdc8fe63e4452d98098426ea1707aec47 Mon Sep 17 00:00:00 2001 From: Gerard Braad Date: Wed, 11 Dec 2024 02:59:58 +0000 Subject: [PATCH] Update to F41 --- .codesandbox/Dockerfile | 7 +++--- .devcontainer/devcontainer.json | 2 +- .github/workflows/build-containers.yml | 33 ++++++++++++++++++++++++++ containers/Containerfile-base | 21 ++++++---------- containers/Containerfile-coder | 6 ++++- containers/Containerfile-dotfiles | 6 ++++- containers/Containerfile-rdesktop | 5 ++++ containers/Containerfile-systemd | 6 ++++- containers/Containerfile-toolbox | 6 ++++- containers/Containerfile-vim | 6 ++++- gitpod/Dockerfile | 2 +- 11 files changed, 75 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/build-containers.yml create mode 100644 containers/Containerfile-rdesktop diff --git a/.codesandbox/Dockerfile b/.codesandbox/Dockerfile index 2af6f8c..c190608 100644 --- a/.codesandbox/Dockerfile +++ b/.codesandbox/Dockerfile @@ -1,4 +1,6 @@ -FROM --platform=linux/amd64 ghcr.io/gbraad-devenv/fedora/dotfiles:40 +FROM --platform=linux/amd64 ghcr.io/gbraad-devenv/fedora/dotfiles:41 + +LABEL org.opencontainers.image.source = "https://github.com/gbraad-devenv/fedora" USER root @@ -7,6 +9,3 @@ RUN dnf update -y tailscale \ && rm -rf /var/cache/yum USER gbraad - -RUN git clone https://github.com/gbraad/dotfiles ~/.dotfiles \ - && ~/.dotfiles/install.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f5fa1eb..4fafb4e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ { "name": "Fedora developer environment", //"dockerFile": "Dockerfile", - "image": "ghcr.io/gbraad-devenv/fedora/dotfiles:40", + "image": "ghcr.io/gbraad-devenv/fedora/dotfiles:41", "context": "..", "runArgs": [ "--cap-add=NET_ADMIN", "--cap-add=NET_RAW", "--device=/dev/net/tun" ], "postStartCommand": "github/install.sh", diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml new file mode 100644 index 0000000..ef29bab --- /dev/null +++ b/.github/workflows/build-containers.yml @@ -0,0 +1,33 @@ +name: build containers +run-name: building containers +on: + schedule: + - cron: "0 0 1 * *" + push: + branches: + - "main" + pull_request: {} + workflow_dispatch: +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-24.04 + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Run podman build - base + run: podman build -t ghcr.io/gbraad-devenv/fedora/base:41 -f containers/Containerfile-base . + - name: Run podman build - dotfiles + run: podman build -t ghcr.io/gbraad-devenv/fedora/dotfiles:41 -f containers/Containerfile-dotfiles . + - name: Run podman build - systemd + run: podman build -t ghcr.io/gbraad-devenv/fedora/systemd:41 -f containers/Containerfile-systemd . + - name: Push image to ghcr.io - base + run: podman push --creds=${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/gbraad-devenv/fedora/base:41 + - name: Push image to ghcr.io - dotfiles + run: podman push --creds=${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/gbraad-devenv/fedora/dotfiles:41 + - name: Push image to ghcr.io - systemd + run: podman push --creds=${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/gbraad-devenv/fedora/systemd:41 diff --git a/containers/Containerfile-base b/containers/Containerfile-base index 1521cea..7da1d95 100644 --- a/containers/Containerfile-base +++ b/containers/Containerfile-base @@ -1,12 +1,11 @@ -FROM registry.fedoraproject.org/fedora:40 - -USER root +ARG BASE_IMAGE="quay.io/fedora/fedora" +ARG BASE_VERSION="41" +FROM ${BASE_IMAGE}:${BASE_VERSION} AS base +LABEL org.opencontainers.image.source = "https://github.com/gbraad-devenv/fedora" -# Needed for the experimental network mode (to support Tailscale) -#RUN curl -o /usr/bin/slirp4netns -fsSL https://github.com/rootless-containers/slirp4netns/releases/download/v1.1.12/slirp4netns-$(uname -m) \ -# && chmod +x /usr/bin/slirp4netns +USER root # Add user with the expected ID (automated setup does not work atm) RUN useradd -l -u 1000 -G wheel -md /home/gbraad -s /usr/bin/zsh -p gbraad gbraad \ @@ -19,7 +18,7 @@ RUN dnf install -y \ && rm -rf /var/cache/yum # install tailscale -RUN dnf config-manager --add-repo https://pkgs.tailscale.com/stable/fedora/tailscale.repo \ +RUN dnf config-manager addrepo --from-repofile=https://pkgs.tailscale.com/stable/fedora/tailscale.repo \ && dnf install -y \ tailscale \ && dnf clean all \ @@ -28,12 +27,6 @@ RUN dnf config-manager --add-repo https://pkgs.tailscale.com/stable/fedora/tails COPY scripts/tailscaled /etc/init.d/tailscaled -# for toolbox -#RUN dnf install -y \ -# zsh bc curl diffutils dnf-plugins-core findutils gnupg2 less lsof ncurses passwd pinentry procps-ng shadow-utils sudo time util-linux wget vte-profile \ -# && dnf clean all \ -# && rm -rf /var/cache/yum - # dotfiles for root RUN curl -sSL https://raw.githubusercontent.com/gbraad/dotfiles/master/install.sh | sh @@ -99,7 +92,7 @@ RUN dnf install -y \ && rm -rf /var/cache/yum # github client -RUN dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo \ +RUN dnf config-manager addrepo --from-repofile=https://cli.github.com/packages/rpm/gh-cli.repo \ && dnf install -y \ gh \ && dnf clean all \ diff --git a/containers/Containerfile-coder b/containers/Containerfile-coder index b9bd269..7cad323 100644 --- a/containers/Containerfile-coder +++ b/containers/Containerfile-coder @@ -1,4 +1,8 @@ -FROM ghcr.io/gbraad-devenv/fedora/systemd:40 +ARG BASE_VERSION="41" + +FROM ghcr.io/gbraad-devenv/fedora/systemd:${BASE_VERSION} + +LABEL org.opencontainers.image.source = "https://github.com/gbraad-devenv/fedora" RUN VERSION=4.93.1 \ && USER=gbraad \ diff --git a/containers/Containerfile-dotfiles b/containers/Containerfile-dotfiles index c09e867..9ceff1b 100644 --- a/containers/Containerfile-dotfiles +++ b/containers/Containerfile-dotfiles @@ -1,4 +1,8 @@ -FROM ghcr.io/gbraad-devenv/fedora/base:40 +ARG BASE_VERSION="41" + +FROM ghcr.io/gbraad-devenv/fedora/base:${BASE_VERSION} + +LABEL org.opencontainers.image.source = "https://github.com/gbraad-devenv/fedora" RUN git clone https://github.com/gbraad/dotfiles ~/.dotfiles \ && ~/.dotfiles/install.sh diff --git a/containers/Containerfile-rdesktop b/containers/Containerfile-rdesktop new file mode 100644 index 0000000..a644d4e --- /dev/null +++ b/containers/Containerfile-rdesktop @@ -0,0 +1,5 @@ +ARG BASE_VERSION="41" + +FROM ghcr.io/gbraad-devenv/fedora/base:${BASE_VERSION} + +LABEL org.opencontainers.image.source = "https://github.com/gbraad-devenv/fedora" diff --git a/containers/Containerfile-systemd b/containers/Containerfile-systemd index bfd517b..eedfe06 100644 --- a/containers/Containerfile-systemd +++ b/containers/Containerfile-systemd @@ -1,4 +1,8 @@ -FROM ghcr.io/gbraad-devenv/fedora/dotfiles:40 +ARG BASE_VERSION="41" + +FROM ghcr.io/gbraad-devenv/fedora/dotfiles:${BASE_VERSION} + +LABEL org.opencontainers.image.source = "https://github.com/gbraad-devenv/fedora" USER root diff --git a/containers/Containerfile-toolbox b/containers/Containerfile-toolbox index ce6f1bb..de61a10 100644 --- a/containers/Containerfile-toolbox +++ b/containers/Containerfile-toolbox @@ -1,4 +1,8 @@ -FROM ghcr.io/gbraad-devenv/fedora/base:40 +ARG BASE_VERSION="41" + +FROM ghcr.io/gbraad-devenv/fedora/base:${BASE_VERSION} + +LABEL org.opencontainers.image.source = "https://github.com/gbraad-devenv/fedora" USER root diff --git a/containers/Containerfile-vim b/containers/Containerfile-vim index 4c6715d..20962c5 100644 --- a/containers/Containerfile-vim +++ b/containers/Containerfile-vim @@ -1,4 +1,8 @@ -FROM ghcr.io/gbraad-devenv/fedora/base:40 +ARG BASE_VERSION="41" + +FROM ghcr.io/gbraad-devenv/fedora/base:${BASE_VERSION} + +LABEL org.opencontainers.image.source = "https://github.com/gbraad-devenv/fedora" USER root diff --git a/gitpod/Dockerfile b/gitpod/Dockerfile index b9ba6dd..c427391 100644 --- a/gitpod/Dockerfile +++ b/gitpod/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 ghcr.io/gbraad-devenv/fedora/base:40 +FROM --platform=linux/amd64 ghcr.io/gbraad-devenv/fedora/base:41 USER root