Skip to content

Commit

Permalink
migrate to upstream wolfi parent container
Browse files Browse the repository at this point in the history
  • Loading branch information
aussielunix committed Jun 7, 2024
1 parent 1c2de52 commit 865e507
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 4 deletions.
22 changes: 20 additions & 2 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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/ \
Expand Down
43 changes: 41 additions & 2 deletions extra-packages
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 865e507

Please sign in to comment.