Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#188408474] Add Debian12 #13

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
- dockerfile: dockerfiles/Ubuntu
image: ghcr.io/rheinwerk/molecule:ubuntu-22.04
build-args: "OS_VERSION=22.04"
- dockerfile: dockerfiles/Debian
image: ghcr.io/rheinwerk/molecule:debian-12
build-args: "OS_VERSION=bookworm"

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Based on latest alpine with following software:

## Ubuntu

Upstream Ubuntu 20.04 / 22.04 Docker Container with following extensions:
Upstream Ubuntu 20.04 / 22.04 | Debian 12 Docker Container with following extensions:

- Cron
- DNSmasq
Expand All @@ -35,7 +35,7 @@ This will test your role against the following Ansible Scenarios:
- `ansible_next`
- `ansible_latest`

Used Ansible Version for these scenarios are defined in [action.yml](examples/action.yml), but can be overridden. Leave `ansible_scenario` unset for simple tests against latest ansible and molecule version.
Used Ansible Version for these scenarios are defined in [action.yml](examples/action.yml), but can be overridden. Leave `ansible_scenario` unset for simple tests against latest ansible and molecule version.

# Configuration
## Only Lint, no Molecule Tests
Expand Down
66 changes: 66 additions & 0 deletions dockerfiles/Debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
ARG OS_VERSION=stable

FROM --platform=$BUILDPLATFORM debian:${OS_VERSION}

ARG DEBIAN_FRONTEND=noninteractive

# Install dependencies.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
bash \
gnupg \
ca-certificates \
curl \
cron \
dnsmasq \
iproute2 \
locales \
lsb-release \
procps \
python3-minimal \
python3-apt \
python3-pip \
python3-setuptools \
python3-simplejson \
python3-debian \
rsyslog \
software-properties-common \
sudo \
systemd \
systemd-sysv \
tar \
unzip \
wget \
xz-utils \
zip \
&& apt-get clean \
&& rm -Rf /var/lib/apt/lists/* \
&& rm -Rf /usr/share/doc && find /usr/share/man -type f -delete \
&& rm -rf /tmp/* /var/tmp/* ; \
rm -rf /lib/systemd/system/multi-user.target.wants/* ; \
rm -rf /etc/systemd/system/*.wants/* ; \
rm -rf /lib/systemd/system/local-fs.target.wants/* ; \
rm -rf /lib/systemd/system/sockets.target.wants/*udev* ; \
rm -rf /lib/systemd/system/sockets.target.wants/*initctl* ; \
rm -rf /lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup* ; \
rm -rf /lib/systemd/system/systemd-update-utmp* ; \
rm -rf /lib/systemd/system/getty.target

# Install Python 3.12
RUN wget -qO- https://pascalroeleven.nl/deb-pascalroeleven.gpg | sudo tee /etc/apt/keyrings/deb-pascalroeleven.gpg
RUN echo "\
Types: deb\n\
URIs: http://deb.pascalroeleven.nl/python3.12\n\
Suites: bookworm-backports\n\
Components: main\n\
Signed-By: /etc/apt/keyrings/deb-pascalroeleven.gpg" \
> /etc/apt/sources.list.d/pascalroeleven.sources

RUN apt-get update \
&& apt-get -y install python3.12 python3.12-dev python3.12-venv

# Fix potential UTF-8 errors with ansible-test.
RUN locale-gen en_US.UTF-8

CMD ["/lib/systemd/systemd"]
Loading