Skip to content

Commit

Permalink
Add Debian 11 and Debian 12 images
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorific committed Aug 11, 2024
1 parent 37b478e commit 29795a3
Show file tree
Hide file tree
Showing 9 changed files with 197 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ jobs:
buildpack-deps/ubuntu/jammy: 'buildpack-deps/ubuntu/jammy/**'
buildpack-deps/ubuntu/focal: 'buildpack-deps/ubuntu/focal/**'
buildpack-deps/ubuntu/noble: 'buildpack-deps/ubuntu/noble/**'
dokken/almalinux-9: 'dokken/almalinux-9/**'
dokken/amazonlinux-2: 'dokken/amazonlinux-2/**'
dokken/amazonlinux-2023: 'dokken/amazonlinux-2023/**'
dokken/centos-stream-9: 'dokken/centos-stream-9/**'
dokken/debian-11: 'dokken/debian-11/**'
dokken/debian-12: 'dokken/debian-12/**'
dokken/oraclelinux-7: 'dokken/oraclelinux-7/**'
dokken/oraclelinux-8: 'dokken/oraclelinux-8/**'
dokken/oraclelinux-9: 'dokken/oraclelinux-9/**'
Expand Down
1 change: 1 addition & 0 deletions dokken/debian-11/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/
57 changes: 57 additions & 0 deletions dokken/debian-11/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
ARG CONTAINER_REGISTRY=docker.io
FROM $CONTAINER_REGISTRY/debian:11

# hadolint ignore=DL3015
RUN <<EOF
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y install \
apt-transport-https \
apt-utils \
cron \
curl \
dbus \
dirmngr \
dmidecode \
gnupg \
ifupdown \
iptables \
iputils-ping \
kmod \
less \
locales \
lsb-release \
lsof \
net-tools \
netcat \
nmap \
perl \
procps \
strace \
sudo \
systemd \
tcpdump \
telnet \
tzdata \
udev \
vim-tiny \
wget
apt-get clean
apt-get -y autoremove
rm -rf /tmp/* /var/tmp/*
ln -s /bin/mkdir /usr/bin/mkdir
find /etc/systemd/system \
/lib/systemd/system \
-path '*.wants/*' \
\( -name '*getty*' \
-or -name '*apt-daily*' \
-or -name '*systemd-timesyncd*' \
-or -name '*systemd-logind*' \
-or -name '*systemd-vconsole-setup*' \
-or -name '*systemd-readahead*' \
-or -name '*udev*' \) \
-exec rm -v {} \;
systemctl set-default multi-user.target
systemctl mask dev-hugepages.mount sys-fs-fuse-connections.mount network.service
EOF

CMD [ "/bin/systemd" ]
36 changes: 36 additions & 0 deletions dokken/debian-11/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
variable "IMAGE_NAME" {
default = "dokken-debian-11"
}

variable "CONTAINER_REGISTRY" {
default = "docker.io/boxcutter"
}

# There's no darwin-based Docker, so if we're running on macOS, change the platform to linux
variable "LOCAL_PLATFORM" {
default = regex_replace("${BAKE_LOCAL_PLATFORM}", "^(darwin)", "linux")
}

target "_common" {
dockerfile = "Containerfile"
tags = [
"${CONTAINER_REGISTRY}/${IMAGE_NAME}:latest"
]
labels = {
"org.opencontainers.image.source" = "https://github.com/boxcutter/oci"
"org.opencontainers.image.licenses" = "Apache-2.0"
"org.opencontainers.image.description" = "Debian 11 Bullseye image for use with kitchen-dokken"
"org.opencontainers.image.title" = "${IMAGE_NAME}"
"dev.boxcutter.image.readme-filepath" = "dokken/README.md"
}
}

target "local" {
inherits = ["_common"]
platforms = ["${LOCAL_PLATFORM}"]
}

target "default" {
inherits = ["_common"]
platforms = ["linux/amd64", "linux/arm64/v8"]
}
3 changes: 3 additions & 0 deletions dokken/debian-11/test/controls/debian-11.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
describe command('lsb_release --release') do
its('stdout') { should match(/Release:\t11/) }
end
1 change: 1 addition & 0 deletions dokken/debian-12/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/
57 changes: 57 additions & 0 deletions dokken/debian-12/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
ARG CONTAINER_REGISTRY=docker.io
FROM $CONTAINER_REGISTRY/debian:bookworm

# hadolint ignore=DL3015
RUN <<EOF
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y install \
apt-transport-https \
apt-utils \
cron \
curl \
dbus \
dirmngr \
dmidecode \
gnupg \
ifupdown \
iptables \
iputils-ping \
kmod \
less \
locales \
lsb-release \
lsof \
net-tools \
nmap \
perl \
python-is-python3 \
procps \
strace \
sudo \
systemd \
tcpdump \
telnet \
tzdata \
udev \
vim-tiny \
wget
apt-get clean
apt-get -y autoremove
rm -rf /tmp/* /var/tmp/*
ln -s /bin/mkdir /usr/bin/mkdir
find /etc/systemd/system \
/lib/systemd/system \
-path '*.wants/*' \
\( -name '*getty*' \
-or -name '*apt-daily*' \
-or -name '*systemd-timesyncd*' \
-or -name '*systemd-logind*' \
-or -name '*systemd-vconsole-setup*' \
-or -name '*systemd-readahead*' \
-or -name '*udev*' \) \
-exec rm -v {} \;
systemctl set-default multi-user.target
systemctl mask dev-hugepages.mount sys-fs-fuse-connections.mount network.service
EOF

CMD [ "/bin/systemd" ]
36 changes: 36 additions & 0 deletions dokken/debian-12/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
variable "IMAGE_NAME" {
default = "dokken-debian-12"
}

variable "CONTAINER_REGISTRY" {
default = "docker.io/boxcutter"
}

# There's no darwin-based Docker, so if we're running on macOS, change the platform to linux
variable "LOCAL_PLATFORM" {
default = regex_replace("${BAKE_LOCAL_PLATFORM}", "^(darwin)", "linux")
}

target "_common" {
dockerfile = "Containerfile"
tags = [
"${CONTAINER_REGISTRY}/${IMAGE_NAME}:latest"
]
labels = {
"org.opencontainers.image.source" = "https://github.com/boxcutter/oci"
"org.opencontainers.image.licenses" = "Apache-2.0"
"org.opencontainers.image.description" = "Debian 12 Bookworm image for use with kitchen-dokken"
"org.opencontainers.image.title" = "${IMAGE_NAME}"
"dev.boxcutter.image.readme-filepath" = "dokken/README.md"
}
}

target "local" {
inherits = ["_common"]
platforms = ["${LOCAL_PLATFORM}"]
}

target "default" {
inherits = ["_common"]
platforms = ["linux/amd64", "linux/arm64/v8"]
}
3 changes: 3 additions & 0 deletions dokken/debian-12/test/controls/debian-11.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
describe command('lsb_release --release') do
its('stdout') { should match(/Release:\t11/) }
end

0 comments on commit 29795a3

Please sign in to comment.