ci(images): preinstall gnupg in molecule-ubuntu2404
The docker scenario installs gnupg in prepare to sign its stand-in APT repository, which costs an apt update and an install in every run (about 10 s of its 12 s prepare); system_baseline installs it among its essential packages. It is now part of the image, version 0.1.6. Image input only: the consumers' pins, the docker prepare task and the image-smoke contract move in the pin follow-up pull request, once the build on main has printed the new digest. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
This commit is contained in:
1 parent
ceeca66209
commit
0a3ff387d7
3 files changed
+9
-5
No files matched your search
@@ -76,7 +76,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: molecule-ubuntu2404
|
- name: molecule-ubuntu2404
|
||||||
version: 0.1.5
|
version: 0.1.6
|
||||||
subpath: images/molecule-ubuntu2404
|
subpath: images/molecule-ubuntu2404
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
job_image: ubuntu:24.04@sha256:fe81560990fae86dc4743202b2cb4d3df98d0bcf949173cecef15ce1127ef852
|
job_image: ubuntu:24.04@sha256:fe81560990fae86dc4743202b2cb4d3df98d0bcf949173cecef15ce1127ef852
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ It is the release of the home lab's LXC hosts today.
|
|||||||
`ca-certificates`.
|
`ca-certificates`.
|
||||||
- Python for Ansible on the target: `python3`, `python3-apt`, `python3-systemd`.
|
- Python for Ansible on the target: `python3`, `python3-apt`, `python3-systemd`.
|
||||||
- The packages the roles manage, preinstalled so a converge makes no network calls:
|
- The packages the roles manage, preinstalled so a converge makes no network calls:
|
||||||
`iptables`, `ufw`, `fail2ban`, `openssh-server` (the `ssh` unit is enabled).
|
`iptables`, `ufw`, `fail2ban`, `openssh-server` (the `ssh` unit is enabled), and `gnupg`
|
||||||
|
(the docker scenario signs its stand-in APT repository with it).
|
||||||
- Throwaway SSH host keys and a machine-id generated at build time. They are not secrets and the
|
- Throwaway SSH host keys and a machine-id generated at build time. They are not secrets and the
|
||||||
image is a test target that must never be exposed to a network.
|
image is a test target that must never be exposed to a network.
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
# One RUN layer: about 30 MB compressed on top of the 29.8 MB base (estimated from
|
# One RUN layer: about 30 MB compressed on top of the 29.8 MB base (estimated from
|
||||||
# the real .debs, with the .pyc files the postinst scripts compile), far below
|
# the real .debs, with the .pyc files the postinst scripts compile), far below
|
||||||
# Cloudflare's 100 MB request-body limit on git.rkdr.net (kaniko pushes a layer as
|
# Cloudflare's 100 MB request-body limit on git.rkdr.net (kaniko pushes a layer as
|
||||||
# one request). apt packages are not version-pinned, as in the original image; the
|
# one request; gnupg adds a few MB, not measured). apt packages are not version-pinned, as in the original image; the
|
||||||
# base image is pinned by digest and a rebuild is a reviewed digest bump downstream.
|
# base image is pinned by digest and a rebuild is a reviewed digest bump downstream.
|
||||||
#
|
#
|
||||||
# The image carries SSH host keys and a machine-id generated at build time (the
|
# The image carries SSH host keys and a machine-id generated at build time (the
|
||||||
@@ -36,7 +36,7 @@ LABEL org.opencontainers.image.title="molecule-ubuntu2404" \
|
|||||||
org.opencontainers.image.authors="Defame1297 and contributors" \
|
org.opencontainers.image.authors="Defame1297 and contributors" \
|
||||||
org.opencontainers.image.base.name="ubuntu:24.04" \
|
org.opencontainers.image.base.name="ubuntu:24.04" \
|
||||||
net.rkdr.mortis.purpose="Disposable Ubuntu 24.04 test target for the molecule scenarios of the mortis.kamino Ansible Collection." \
|
net.rkdr.mortis.purpose="Disposable Ubuntu 24.04 test target for the molecule scenarios of the mortis.kamino Ansible Collection." \
|
||||||
net.rkdr.mortis.contents="Ubuntu 24.04, systemd, systemd-sysv, dbus, sudo, iproute2, ca-certificates, python3, python3-apt, python3-systemd, iptables, ufw, fail2ban, openssh-server (ssh enabled)" \
|
net.rkdr.mortis.contents="Ubuntu 24.04, systemd, systemd-sysv, dbus, sudo, iproute2, ca-certificates, python3, python3-apt, python3-systemd, iptables, ufw, fail2ban, openssh-server (ssh enabled), gnupg" \
|
||||||
net.rkdr.mortis.usage="Molecule docker-driver platform with pre_build_image true, command /sbin/init, cgroupns_mode host, /sys/fs/cgroup mounted rw, tmpfs on /run and /run/lock, capability NET_ADMIN, security_opts apparmor=unconfined (not privileged). Pin git.rkdr.net/mortis/name:version@sha256:digest. See the documentation label."
|
net.rkdr.mortis.usage="Molecule docker-driver platform with pre_build_image true, command /sbin/init, cgroupns_mode host, /sys/fs/cgroup mounted rw, tmpfs on /run and /run/lock, capability NET_ADMIN, security_opts apparmor=unconfined (not privileged). Pin git.rkdr.net/mortis/name:version@sha256:digest. See the documentation label."
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
@@ -44,13 +44,16 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||||||
# systemd as PID 1 with D-Bus, sudo and networking tools; the Python Ansible needs on
|
# systemd as PID 1 with D-Bus, sudo and networking tools; the Python Ansible needs on
|
||||||
# the target (python3-apt for the apt module); the firewall and intrusion-prevention
|
# the target (python3-apt for the apt module); the firewall and intrusion-prevention
|
||||||
# packages the roles manage (python3-systemd is a dependency of fail2ban's systemd
|
# packages the roles manage (python3-systemd is a dependency of fail2ban's systemd
|
||||||
# backend); sshd, enabled so a converge can test it under systemd.
|
# backend); sshd, enabled so a converge can test it under systemd; gnupg, which the docker
|
||||||
|
# scenario signs its stand-in APT repository with and which would otherwise cost it an
|
||||||
|
# apt update and install in every run.
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
systemd systemd-sysv dbus sudo iproute2 ca-certificates \
|
systemd systemd-sysv dbus sudo iproute2 ca-certificates \
|
||||||
python3 python3-apt python3-systemd \
|
python3 python3-apt python3-systemd \
|
||||||
iptables ufw fail2ban \
|
iptables ufw fail2ban \
|
||||||
openssh-server \
|
openssh-server \
|
||||||
|
gnupg \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& systemctl enable ssh
|
&& systemctl enable ssh
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user