Skip to content

Commit bda3961

Browse files
committed
Trixie
1 parent cad6236 commit bda3961

File tree

3 files changed

+136
-1
lines changed

3 files changed

+136
-1
lines changed

.github/workflows/debian12.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
platforms: linux/amd64, linux/arm64, linux/386, linux/arm/v7, linux/arm64/v8
8989
push: ${{ github.event_name != 'pull_request' }}
9090
tags: |
91-
${{ github.repository }}:debian12, ${{ github.repository }}:bookworm, ${{ github.repository }}:debian_latest
91+
${{ github.repository }}:debian12, ${{ github.repository }}:bookworm
9292
labels: ${{ steps.meta.outputs.labels }}
9393

9494
- name: Docker Scout

.github/workflows/debian13.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
name: deb-trixie
3+
4+
on:
5+
pull_request:
6+
push:
7+
paths:
8+
- 'debian13/**'
9+
- '.github/workflows/debian13.yml'
10+
schedule:
11+
- cron: '10 6,15 * * 1,6'
12+
workflow_dispatch:
13+
14+
permissions: write-all
15+
16+
concurrency:
17+
group: ${{ github.ref }}-${{ github.workflow }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
# Test the image builds and works correctly.
22+
test:
23+
name: Test debian13
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
matrix:
27+
os: [ubuntu-22.04]
28+
29+
steps:
30+
- uses: actions/[email protected]
31+
32+
- name: Test building image.
33+
run: cd debian13 && docker build -t debian13 .
34+
35+
- name: Run the built image.
36+
run: docker run --name test-container -d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:rw debian13
37+
38+
# If on master branch, build and release image.
39+
release:
40+
name: Release
41+
runs-on: ubuntu-latest
42+
needs: test
43+
if: github.ref == 'refs/heads/master'
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
- name: Docker meta
48+
id: meta
49+
uses: docker/metadata-action@v5
50+
with:
51+
# list of Docker images to use as base name for tags
52+
images: |
53+
${{ github.repository }}:debian13
54+
# generate Docker tags based on the following events/attributes
55+
tags: |
56+
type=schedule
57+
type=ref,event=branch
58+
type=ref,event=pr
59+
type=semver,pattern={{version}}
60+
type=semver,pattern={{major}}.{{minor}}
61+
type=semver,pattern={{major}}
62+
type=sha
63+
- uses: docker/setup-qemu-action@v3
64+
- uses: docker/setup-buildx-action@v3
65+
66+
- name: Login to DockerHub
67+
if: github.event_name != 'pull_request'
68+
uses: docker/login-action@v3
69+
with:
70+
username: ${{ secrets.DOCKERHUB_USERNAME }}
71+
password: ${{ secrets.DOCKERHUB_TOKEN }}
72+
73+
- name: Login to GHCR
74+
if: github.event_name != 'pull_request'
75+
uses: docker/login-action@v3
76+
with:
77+
registry: ghcr.io
78+
username: ${{ github.repository_owner }}
79+
password: ${{ secrets.GITHUB_TOKEN }}
80+
81+
- name: Build and push image.
82+
uses: docker/build-push-action@v5
83+
with:
84+
context: debian13/
85+
sbom: true
86+
provenance: mode=max
87+
file: debian13/Dockerfile
88+
platforms: linux/amd64, linux/arm64, linux/386, linux/arm/v7, linux/arm64/v8
89+
push: ${{ github.event_name != 'pull_request' }}
90+
tags: |
91+
${{ github.repository }}:debian13, ${{ github.repository }}:trixie, ${{ github.repository }}:debian_latest
92+
labels: ${{ steps.meta.outputs.labels }}
93+
94+
- name: Docker Scout
95+
id: docker-scout
96+
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
97+
uses: docker/[email protected]
98+
with:
99+
command: quickview,cves,recommendations,sbom,environment
100+
image: ${{ steps.meta.outputs.tags }}
101+
environment: prod
102+
organization: shadownet
103+
only-severities: critical,high,medium
104+
exit-code: true
105+
only-fixed: true

debian13/Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# syntax=docker/dockerfile:1
2+
FROM debian:trixie
3+
4+
LABEL maintainer="buluma"
5+
LABEL build_date="2025-12-01"
6+
7+
LABEL org.opencontainers.image.title="Docker Debian Trixie Systemd" \
8+
org.opencontainers.image.description="Ubuntu Container for Ansible Tests." \
9+
org.opencontainers.image.url="https://github.com/buluma/docker-molecule-images/" \
10+
org.opencontainers.image.source="https://github.com/buluma/docker-molecule-images" \
11+
org.opencontainers.image.licenses="Apache-2.0"
12+
13+
ENV container docker
14+
ENV DEBIAN_FRONTEND noninteractive
15+
16+
# Enable systemd.
17+
RUN apt-get update ; \
18+
apt-get install -y sudo systemd systemd-sysv; \
19+
apt-get clean ; \
20+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ; \
21+
rm -rf /lib/systemd/system/multi-user.target.wants/* ; \
22+
rm -rf /etc/systemd/system/*.wants/* ; \
23+
rm -rf /lib/systemd/system/local-fs.target.wants/* ; \
24+
rm -rf /lib/systemd/system/sockets.target.wants/*udev* ; \
25+
rm -rf /lib/systemd/system/sockets.target.wants/*initctl* ; \
26+
rm -rf /lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup* ; \
27+
rm -rf /lib/systemd/system/systemd-update-utmp*
28+
29+
VOLUME [ "/sys/fs/cgroup" ]
30+
CMD ["/lib/systemd/systemd"]

0 commit comments

Comments
 (0)