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

debian: add debian 12 "bookworm" release #90

Merged
merged 2 commits into from
Jul 25, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/debian-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
build-images:
strategy:
matrix:
release: ['10', '11', 'testing', 'unstable']
release: ['10', '11', '12', 'testing', 'unstable']

runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
build-and-push-images:
strategy:
matrix:
release: ['10', '11', 'testing', 'unstable']
release: ['10', '11', '12', 'testing', 'unstable']

runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ directly use the commands below:
$ toolbox create --image quay.io/toolbx-images/debian-toolbox:testing
$ toolbox enter debian-toolbox-testing

$ toolbox create --image quay.io/toolbx-images/debian-toolbox:12
$ toolbox enter debian-toolbox-12

$ toolbox create --image quay.io/toolbx-images/debian-toolbox:11
$ toolbox enter debian-toolbox-11

Expand Down
40 changes: 40 additions & 0 deletions debian/12/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM docker.io/library/debian:12

LABEL com.github.containers.toolbox="true" \
name="debian-toolbox" \
version="12" \
usage="This image is meant to be used with the toolbox command" \
summary="Base image for creating Debian toolbox containers" \
maintainer=""

# Remove apt configuration optimized for containers
# Remove docker-gzip-indexes to help with "command-not-found"
RUN rm /etc/apt/apt.conf.d/docker-gzip-indexes /etc/apt/apt.conf.d/docker-no-languages

# Enable myhostname nss plugin for clean hostname resolution without patching
# hosts (at least for sudo), add it right after 'files' entry. We expect that
# this entry is not present yet. Do this early so that package postinst (which
# adds it too late in the order) skips this step
RUN sed -Ei 's/^(hosts:.*)(\<files\>)\s*(.*)/\1\2 myhostname \3/' /etc/nsswitch.conf

# Prevent questions when installing packages
ARG DEBIAN_FRONTEND=noninteractive

# Make flatpak-xdg-utils usable inside the toolbox
COPY toolbox-flatpak-xdg-utils.sh /etc/profile.d

# Install extra packages as well as libnss-myhostname
COPY extra-packages /
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install \
libnss-myhostname \
$(cat extra-packages | xargs) && \
rm -rd /var/lib/apt/lists/*
RUN rm /extra-packages

# Enable password less sudo
RUN sed -i -e 's/ ALL$/ NOPASSWD:ALL/' /etc/sudoers

RUN echo VARIANT_ID=container >> /etc/os-release
# ?
RUN touch /etc/localtime
38 changes: 38 additions & 0 deletions debian/12/extra-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
bash-completion
bc
bzip2
diffutils
findutils
flatpak-xdg-utils
git
gnupg
gpgsm
hostname
iproute2
iputils-tracepath
keyutils
less
libcap2-bin
libkrb5-3
libnss-mdns
lsof
man-db
manpages
mtr
nano
openssh-client
passwd
pigz
procps
rsync
sudo
tcpdump
time
traceroute
tree
unzip
util-linux
wget
xauth
xz-utils
zip
12 changes: 12 additions & 0 deletions debian/12/toolbox-flatpak-xdg-utils.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# shellcheck shell=sh disable=SC2153
# Add flatpak-xdg-utils to PATH to allow running nested toolbox
# containers (i.e. uses flatpak-spawn).
# This also makes the xdg-utils replacements available as part of
# flatpak-xdg-utils (e.g. xdg-open) usable inside toolbox (requires
# xdg-desktop-portal on the host side).

if [ -f /run/.containerenv ] && [ -f /run/.toolboxenv ]
then
PATH="/usr/libexec/flatpak-xdg-utils:$PATH"
export PATH
fi