diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 78621bf..7ad19d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,152 +12,102 @@ jobs: strategy: matrix: include: - - name: openrc-alpine - dockerfile: openrc/alpine/Dockerfile + - path: openrc/alpine platforms: |- linux/amd64 tags: |- jrei/openrc-alpine:latest - - name: aports-dev - dockerfile: aports-dev/Dockerfile + - path: aports-dev platforms: |- linux/amd64 tags: |- jrei/aports-dev:latest - - name: systemd-centos-7 - dockerfile: systemd/centos/7.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/centos + version: "7" tags: |- jrei/systemd-centos:7 - - name: systemd-centos-8 - dockerfile: systemd/centos/8.Dockerfile + - path: systemd/centos + version: "8" platforms: |- linux/amd64 linux/arm64 tags: |- jrei/systemd-centos:8 jrei/systemd-centos:latest - - name: systemd-debian-10 - dockerfile: systemd/debian/10.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/debian + version: "10" tags: |- jrei/systemd-debian:10 jrei/systemd-debian:buster - - name: systemd-debian-11 - dockerfile: systemd/debian/11.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/debian + version: "11" tags: |- jrei/systemd-debian:11 jrei/systemd-debian:bullseye - - name: systemd-debian-12 - dockerfile: systemd/debian/12.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/debian + version: "12" tags: |- jrei/systemd-debian:12 jrei/systemd-debian:bookworm jrei/systemd-debian:latest - - name: systemd-debian-13 - dockerfile: systemd/debian/13.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/debian + version: "trixie" tags: |- jrei/systemd-debian:13 jrei/systemd-debian:trixie - - name: systemd-debian-sid - dockerfile: systemd/debian/sid.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/debian + version: "sid" tags: |- jrei/systemd-debian:sid - - name: systemd-fedora-latest - dockerfile: systemd/fedora/Dockerfile + - path: systemd/fedora + version: "latest" platforms: |- linux/amd64 linux/arm64 tags: |- jrei/systemd-fedora:latest - - name: systemd-fedora-41 - dockerfile: systemd/fedora/41.Dockerfile + - path: systemd/fedora + version: "41" platforms: |- linux/amd64 linux/arm64 tags: |- jrei/systemd-fedora:41 - - name: systemd-fedora-42 - dockerfile: systemd/fedora/42.Dockerfile + - path: systemd/fedora + version: "42" platforms: |- linux/amd64 linux/arm64 tags: |- jrei/systemd-fedora:42 jrei/systemd-fedora:latest - - name: systemd-ubuntu-16.04 - dockerfile: systemd/ubuntu/16.04.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/ubuntu + version: "16.04" tags: |- jrei/systemd-ubuntu:16.04 jrei/systemd-ubuntu:xenial - - name: systemd-ubuntu-18.04 - dockerfile: systemd/ubuntu/18.04.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/ubuntu + version: "18.04" tags: |- jrei/systemd-ubuntu:18.04 jrei/systemd-ubuntu:bionic - - name: systemd-ubuntu-20.04 - dockerfile: systemd/ubuntu/20.04.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/ubuntu + version: "20.04" tags: |- jrei/systemd-ubuntu:20.04 jrei/systemd-ubuntu:focal - - name: systemd-ubuntu-22.04 - dockerfile: systemd/ubuntu/22.04.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/ubuntu + version: "22.04" tags: |- jrei/systemd-ubuntu:22.04 jrei/systemd-ubuntu:jammy - - name: systemd-ubuntu-24.04 - dockerfile: systemd/ubuntu/24.04.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/ubuntu + version: "24.04" tags: |- jrei/systemd-ubuntu:24.04 jrei/systemd-ubuntu:noble - - name: systemd-ubuntu-25.04 - dockerfile: systemd/ubuntu/25.04.Dockerfile - platforms: |- - linux/amd64 - linux/arm/v7 - linux/arm64 + - path: systemd/ubuntu + version: "25.04" tags: |- jrei/systemd-ubuntu:25.04 jrei/systemd-ubuntu:plucky @@ -179,12 +129,13 @@ jobs: username: jrei password: ${{ secrets.DOCKER_HUB_TOKEN }} - - name: Build and push ${{ matrix.name }} - uses: docker/build-push-action@v6 + - name: Build and push ${{ matrix.name }} ${{ matrix.version }} + uses: docker/build-push-action@v3 with: context: . - file: ${{ matrix.dockerfile }} - platforms: ${{ matrix.platforms }} + build-args: ${{ matrix.version && format('VERSION={0}', matrix.version) }} + file: ${{ matrix.path }}/Dockerfile + platforms: ${{ matrix.platforms || 'linux/amd64,linux/arm/v7,linux/arm64' }} push: true tags: ${{ matrix.tags }} labels: | diff --git a/systemd/centos/8.Dockerfile b/systemd/centos/8.Dockerfile deleted file mode 100644 index 75cfed7..0000000 --- a/systemd/centos/8.Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM centos:8 - -ENV container docker - -RUN cd /lib/systemd/system/sysinit.target.wants/; \ - for i in *; do [ $i = systemd-tmpfiles-setup.service ] || rm -f $i; done - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/usr/sbin/init"] diff --git a/systemd/centos/7.Dockerfile b/systemd/centos/Dockerfile similarity index 93% rename from systemd/centos/7.Dockerfile rename to systemd/centos/Dockerfile index 702238d..92e13fb 100644 --- a/systemd/centos/7.Dockerfile +++ b/systemd/centos/Dockerfile @@ -1,6 +1,6 @@ -FROM centos:7 +ARG VERSION -ENV container docker +FROM centos:${VERSION} RUN cd /lib/systemd/system/sysinit.target.wants/; \ for i in *; do [ $i = systemd-tmpfiles-setup.service ] || rm -f $i; done diff --git a/systemd/debian/10.Dockerfile b/systemd/debian/10.Dockerfile deleted file mode 100644 index a586eb3..0000000 --- a/systemd/debian/10.Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM debian:buster - -ENV container docker -ENV LC_ALL C -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update \ - && apt-get install -y systemd systemd-sysv \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -RUN cd /lib/systemd/system/sysinit.target.wants/ \ - && rm $(ls | grep -v systemd-tmpfiles-setup) - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* \ - /lib/systemd/system/plymouth* \ - /lib/systemd/system/systemd-update-utmp* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/lib/systemd/systemd"] diff --git a/systemd/debian/11.Dockerfile b/systemd/debian/11.Dockerfile deleted file mode 100644 index 229a1cc..0000000 --- a/systemd/debian/11.Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM debian:bullseye - -ENV container docker -ENV LC_ALL C -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update \ - && apt-get install -y systemd systemd-sysv \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -RUN cd /lib/systemd/system/sysinit.target.wants/ \ - && rm $(ls | grep -v systemd-tmpfiles-setup) - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* \ - /lib/systemd/system/plymouth* \ - /lib/systemd/system/systemd-update-utmp* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/lib/systemd/systemd"] diff --git a/systemd/debian/12.Dockerfile b/systemd/debian/12.Dockerfile deleted file mode 100644 index 52abdc8..0000000 --- a/systemd/debian/12.Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM debian:bookworm - -ENV container docker -ENV LC_ALL C -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update \ - && apt-get install -y systemd systemd-sysv \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -RUN cd /lib/systemd/system/sysinit.target.wants/ \ - && rm $(ls | grep -v systemd-tmpfiles-setup) - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* \ - /lib/systemd/system/plymouth* \ - /lib/systemd/system/systemd-update-utmp* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/lib/systemd/systemd"] diff --git a/systemd/debian/13.Dockerfile b/systemd/debian/13.Dockerfile deleted file mode 100644 index 77b4084..0000000 --- a/systemd/debian/13.Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM debian:trixie - -ENV container docker -ENV LC_ALL C -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update \ - && apt-get install -y systemd systemd-sysv \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -RUN cd /lib/systemd/system/sysinit.target.wants/ \ - && rm $(ls | grep -v systemd-tmpfiles-setup) - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* \ - /lib/systemd/system/plymouth* \ - /lib/systemd/system/systemd-update-utmp* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/lib/systemd/systemd"] diff --git a/systemd/debian/sid.Dockerfile b/systemd/debian/Dockerfile similarity index 89% rename from systemd/debian/sid.Dockerfile rename to systemd/debian/Dockerfile index acba77e..594a3b5 100644 --- a/systemd/debian/sid.Dockerfile +++ b/systemd/debian/Dockerfile @@ -1,8 +1,9 @@ -FROM debian:sid +ARG VERSION -ENV container docker -ENV LC_ALL C -ENV DEBIAN_FRONTEND noninteractive +FROM debian:${VERSION} + +ENV LC_ALL=C +ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y systemd systemd-sysv \ diff --git a/systemd/fedora/41.Dockerfile b/systemd/fedora/41.Dockerfile deleted file mode 100644 index 9416900..0000000 --- a/systemd/fedora/41.Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM fedora:41 - -ENV container docker - -RUN dnf -y update \ - && dnf -y install systemd \ - && dnf clean all - -RUN cd /lib/systemd/system/sysinit.target.wants/; \ - for i in *; do [ $i = systemd-tmpfiles-setup.service ] || rm -f $i; done - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/usr/sbin/init"] diff --git a/systemd/fedora/42.Dockerfile b/systemd/fedora/42.Dockerfile deleted file mode 100644 index 7967ec0..0000000 --- a/systemd/fedora/42.Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM fedora:42 - -ENV container docker - -RUN dnf -y update \ - && dnf -y install systemd \ - && dnf clean all - -RUN cd /lib/systemd/system/sysinit.target.wants/; \ - for i in *; do [ $i = systemd-tmpfiles-setup.service ] || rm -f $i; done - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/usr/sbin/init"] diff --git a/systemd/fedora/Dockerfile b/systemd/fedora/Dockerfile index 197449a..6ecaf46 100644 --- a/systemd/fedora/Dockerfile +++ b/systemd/fedora/Dockerfile @@ -1,6 +1,6 @@ -FROM fedora:latest +ARG VERSION -ENV container docker +FROM fedora:${VERSION} RUN dnf -y update \ && dnf -y install systemd \ diff --git a/systemd/ubuntu/16.04.Dockerfile b/systemd/ubuntu/16.04.Dockerfile deleted file mode 100644 index 127bbfb..0000000 --- a/systemd/ubuntu/16.04.Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM ubuntu:16.04 - -ENV container docker -ENV LC_ALL C -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update \ - && apt-get install -y systemd systemd-sysv \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -RUN cd /lib/systemd/system/sysinit.target.wants/ \ - && rm $(ls | grep -v systemd-tmpfiles-setup) - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* \ - /lib/systemd/system/plymouth* \ - /lib/systemd/system/systemd-update-utmp* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/lib/systemd/systemd"] diff --git a/systemd/ubuntu/20.04.Dockerfile b/systemd/ubuntu/20.04.Dockerfile deleted file mode 100644 index a5398cd..0000000 --- a/systemd/ubuntu/20.04.Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM ubuntu:20.04 - -ENV container docker -ENV LC_ALL C -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update \ - && apt-get install -y systemd systemd-sysv \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -RUN cd /lib/systemd/system/sysinit.target.wants/ \ - && rm $(ls | grep -v systemd-tmpfiles-setup) - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* \ - /lib/systemd/system/plymouth* \ - /lib/systemd/system/systemd-update-utmp* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/lib/systemd/systemd"] diff --git a/systemd/ubuntu/22.04.Dockerfile b/systemd/ubuntu/22.04.Dockerfile deleted file mode 100644 index 429d0b0..0000000 --- a/systemd/ubuntu/22.04.Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM ubuntu:22.04 - -ENV container docker -ENV LC_ALL C -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update \ - && apt-get install -y systemd systemd-sysv \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -RUN cd /lib/systemd/system/sysinit.target.wants/ \ - && rm $(ls | grep -v systemd-tmpfiles-setup) - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* \ - /lib/systemd/system/plymouth* \ - /lib/systemd/system/systemd-update-utmp* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/lib/systemd/systemd"] diff --git a/systemd/ubuntu/24.04.Dockerfile b/systemd/ubuntu/24.04.Dockerfile deleted file mode 100644 index 4b1dd72..0000000 --- a/systemd/ubuntu/24.04.Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM ubuntu:24.04 - -ENV container docker -ENV LC_ALL C -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update \ - && apt-get install -y systemd systemd-sysv \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -RUN cd /lib/systemd/system/sysinit.target.wants/ \ - && rm $(ls | grep -v systemd-tmpfiles-setup) - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* \ - /lib/systemd/system/plymouth* \ - /lib/systemd/system/systemd-update-utmp* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/lib/systemd/systemd"] diff --git a/systemd/ubuntu/25.04.Dockerfile b/systemd/ubuntu/25.04.Dockerfile deleted file mode 100644 index cfb0cae..0000000 --- a/systemd/ubuntu/25.04.Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM ubuntu:25.04 - -ENV container docker -ENV LC_ALL C -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update \ - && apt-get install -y systemd systemd-sysv \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -RUN cd /lib/systemd/system/sysinit.target.wants/ \ - && rm $(ls | grep -v systemd-tmpfiles-setup) - -RUN rm -f /lib/systemd/system/multi-user.target.wants/* \ - /etc/systemd/system/*.wants/* \ - /lib/systemd/system/local-fs.target.wants/* \ - /lib/systemd/system/sockets.target.wants/*udev* \ - /lib/systemd/system/sockets.target.wants/*initctl* \ - /lib/systemd/system/basic.target.wants/* \ - /lib/systemd/system/anaconda.target.wants/* \ - /lib/systemd/system/plymouth* \ - /lib/systemd/system/systemd-update-utmp* - -VOLUME [ "/sys/fs/cgroup" ] - -CMD ["/lib/systemd/systemd"] diff --git a/systemd/ubuntu/18.04.Dockerfile b/systemd/ubuntu/Dockerfile similarity index 89% rename from systemd/ubuntu/18.04.Dockerfile rename to systemd/ubuntu/Dockerfile index d5382c6..c27356a 100644 --- a/systemd/ubuntu/18.04.Dockerfile +++ b/systemd/ubuntu/Dockerfile @@ -1,8 +1,9 @@ -FROM ubuntu:18.04 +ARG VERSION -ENV container docker -ENV LC_ALL C -ENV DEBIAN_FRONTEND noninteractive +FROM ubuntu:${VERSION} + +ENV LC_ALL=C +ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y systemd systemd-sysv \