From 865e5078514cc449bfa0d083f22897bbde10ff86 Mon Sep 17 00:00:00 2001 From: Mick Pollard <261833+aussielunix@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:06:51 +1000 Subject: [PATCH] migrate to upstream wolfi parent container --- Containerfile | 22 ++++++++++++++++++++-- extra-packages | 43 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 4 deletions(-) diff --git a/Containerfile b/Containerfile index 08ce383..4849496 100644 --- a/Containerfile +++ b/Containerfile @@ -1,5 +1,5 @@ -ARG SOURCE_IMAGE_NAME="${SOURCE_IMAGE_NAME:-wolfi-toolbox}" -ARG SOURCE_IMAGE_REGISTRY="${SOURCE_IMAGE_REGISTRY:-ghcr.io/ublue-os}" +ARG SOURCE_IMAGE_NAME="${SOURCE_IMAGE_NAME:-wolfi-base}" +ARG SOURCE_IMAGE_REGISTRY="${SOURCE_IMAGE_REGISTRY:-cgr.dev/chainguard}" ARG SOURCE_IMAGE="${SOURCE_IMAGE_REGISTRY}/${SOURCE_IMAGE_NAME}" FROM $SOURCE_IMAGE:latest @@ -24,6 +24,24 @@ COPY aussielunix_Root_CA_168848365996868199089383065266162030969.crt / RUN cat /aussielunix_Root_CA_168848365996868199089383065266162030969.crt >> /etc/ssl/certs/ca-certificates.crt \ && rm -f /aussielunix_Root_CA_168848365996868199089383065266162030969.crt +# Get Distrobox-host-exec and host-spawn +RUN git clone https://github.com/89luca89/distrobox.git --single-branch /tmp/distrobox && \ + cp /tmp/distrobox/distrobox-host-exec /usr/bin/distrobox-host-exec && \ + cp /tmp/distrobox/distrobox-export /usr/bin/distrobox-export && \ + cp /tmp/distrobox/distrobox-init /usr/bin/entrypoint && \ + wget https://github.com/1player/host-spawn/releases/download/$(cat /tmp/distrobox/distrobox-host-exec | grep host_spawn_version= | cut -d "\"" -f 2)/host-spawn-$(uname -m) -O /usr/bin/host-spawn && \ + chmod +x /usr/bin/host-spawn && \ + rm -drf /tmp/distrobox && \ + ln -fs /bin/sh /usr/bin/sh + +# Enable password less sudo +# using sudoers instead of toolbox filename here, so that in case of rootful +# distroboxes, the NOPASSWD can be deactivated for security reasons. +RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/sudoers + +# Copy the os-release file +RUN cp -p /etc/os-release /usr/lib/os-release + # Configure Locales and get bash-prexec RUN curl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o /tmp/bash-prexec \ && mkdir -p /usr/share/ \ diff --git a/extra-packages b/extra-packages index f20ae23..54bf0e3 100644 --- a/extra-packages +++ b/extra-packages @@ -1,8 +1,47 @@ +bash +bc brew +busybox +bzip2 ca-certificates-bundle +coreutils +curl +diffutils direnv -eza +findmnt +findutils gawk -go +gnupg +gnutar +gpg +iproute2 +iputils +keyutils +less +libcap +man-db +mesa +mount +ncurses +ncurses-terminfo +net-tools +openssh-client +posix-libc-utils +procps +rsync +shadow sed +sudo +tcpdump +tree +tzdata +umount +unzip +util-linux +util-linux-login +util-linux-misc vim +wget +xauth +xz +zip