-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bd7f3e
commit bf0933f
Showing
10 changed files
with
116 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,45 @@ | ||
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 | ||
FROM cgr.dev/chainguard/wolfi-base:latest | ||
|
||
LABEL com.github.containers.toolbox="true" \ | ||
usage="This image is meant to be used with the Toolbox or Distrobox commands" \ | ||
summary="A new cloud-native terminal experience powered by Wolfi and Homebrew" \ | ||
maintainer="Mick Pollard <[email protected]>" | ||
|
||
COPY ./extra-packages /toolbox-packages | ||
COPY ./files / | ||
|
||
# Update image, Install Packages, and move /home/linuxbrew | ||
# Update image && Install some packages | ||
RUN apk update && \ | ||
apk upgrade && \ | ||
grep -v '^#' /toolbox-packages | xargs apk add && \ | ||
grep -v '^#' /extra-packages | xargs apk add && \ | ||
rm /extra-packages && \ | ||
mv /home/linuxbrew /home/homebrew && \ | ||
rm /toolbox-packages | ||
echo "#!/bin/sh" >> /usr/bin/pinentry && \ | ||
echo "exit 0" >> /usr/bin/pinentry && \ | ||
chmod +x /usr/bin/pinentry | ||
|
||
# Install custom CA cert | ||
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 | ||
|
||
#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 mkdir -p /usr/share/ \ | ||
&& printf 'LANG=en_AU.utf8\nexport LANG\n' > /etc/profile.d/locale.sh \ | ||
&& printf 'LANG="en_AU.UTF-8"' > /etc/locale.conf | ||
# Make some symlinks | ||
RUN mkdir -p /usr/local/bin && \ | ||
ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/docker && \ | ||
ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/flatpak && \ | ||
ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/podman && \ | ||
ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/rpm-ostree | ||
|
||
# Change root shell to BASH | ||
RUN sed -i -e '/^root/s/\/bin\/ash/\/bin\/bash/' /etc/passwd | ||
|
||
# Delete nonroot user | ||
RUN userdel nonroot && rm -rf /home/nonroot /etc/profile.d/brew.sh |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export PATH="/home/linuxbrew/.linuxbrew/sbin:/home/linuxbrew/.linuxbrew/bin:$PATH" | ||
export HOMEBREW_NO_ANALYTICS=1 | ||
export HOMEBREW_NO_AUTO_UPDATE=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
LANG=en_AU.utf8 | ||
export LANG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
alpine-keys | ||
apk-tools | ||
bash | ||
bc | ||
binutils | ||
binutils-gold | ||
brew=4.3.18-r0 | ||
bubblewrap | ||
build-base | ||
busybox | ||
bzip2 | ||
ca-certificates-bundle | ||
coreutils | ||
curl | ||
diffutils | ||
expat | ||
findmnt | ||
findutils | ||
gcc | ||
git | ||
glibc | ||
glibc-dev | ||
glibc-locale-posix | ||
gmp | ||
gnupg | ||
go | ||
gpg | ||
iproute2 | ||
iputils | ||
isl | ||
keyutils | ||
less | ||
libbrotlicommon1 | ||
libbrotlidec1 | ||
libcap | ||
libcap-utils | ||
libcrypto3 | ||
libcurl-openssl4 | ||
libgcc | ||
libice | ||
libnghttp2-14 | ||
libpcre2-32-0 | ||
libsm | ||
libssl3 | ||
libstdc++ | ||
libstdc++-dev | ||
libx11 | ||
libxau | ||
libxcb | ||
libxdmcp | ||
libxext | ||
libxmu | ||
libxt | ||
linux-headers | ||
linux-pam | ||
make | ||
man-db | ||
mount | ||
mpc | ||
mpfr | ||
ncurses | ||
ncurses-terminfo | ||
ncurses-terminfo-base | ||
net-tools | ||
openssh-client | ||
pigz | ||
pkgconf | ||
posix-libc-utils | ||
procps | ||
rsync | ||
sed | ||
shadow | ||
sudo | ||
tcpdump | ||
tree | ||
tzdata | ||
umount | ||
unzip | ||
util-linux | ||
util-linux-misc | ||
vim | ||
wget | ||
wolfi-baselayout | ||
xauth | ||
xz | ||
zip | ||
zlib |