Skip to content

Commit

Permalink
Merge pull request #3 from ublue-os/main
Browse files Browse the repository at this point in the history
[pull] main from ublue-os:main
  • Loading branch information
b- authored Oct 12, 2023
2 parents 8915c28 + 59845cc commit ea9e11d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 51 deletions.
4 changes: 2 additions & 2 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ COPY workarounds.sh \
RUN sysctl -p

RUN wget https://copr.fedorainfracloud.org/coprs/ganto/lxc4/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
wget https://copr.fedorainfracloud.org/coprs/bobslept/nerd-fonts/repo/fedora-"${FEDORA_MAJOR_VERSION}"/bobslept-nerd-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/bobslept-nerd-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo
wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo

# Handle packages via packages.json
RUN /tmp/build.sh && \
Expand Down Expand Up @@ -154,7 +154,7 @@ RUN /tmp/1password.sh
RUN /tmp/workarounds.sh

# Clean up repos, everything is on the image so we don't need them
RUN rm -f /etc/yum.repos.d/bobslept-nerd-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
RUN rm -f /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
rm -f /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
rm -f /etc/yum.repos.d/vscode.repo && \
rm -f /etc/yum.repos.d/docker-ce.repo && \
Expand Down
4 changes: 2 additions & 2 deletions just/custom.just
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ brew-shell:
echo "Brew configuration already present in .zprofile"
else
echo "Adding Brew configuration to .zprofile"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.zprofile
echo 'eval "$(/var/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.zprofile
fi
if grep -q "linuxbrew" $HOME/.bash_profile
then
echo "Brew configuration already present in .bash_profile"
else
echo "Adding Brew configuration to .bash_profile"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile
echo 'eval "$(/var/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile
fi

# Enable Cockpit for web-based system management | https://cockpit-project.org/
Expand Down
55 changes: 14 additions & 41 deletions toolboxes/Containerfile.wolfi
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Observations 2023-10-09
#
# * This container does NOT WORK correctly with the current distrobox 1.5.0.2 release, so
# first install the 'next' release (the main branch of the repo) by running
# just distrobox-git
# then close and reopen the terminal before setting up wolfi with
# just distrobox-wolfi
#
# * The initial 'distrobox enter wolfi' command invokes https://github.com/89luca89/distrobox/blob/main/distrobox-init
# which installs many basic packages and distrobox deps (starts at about line 400+).
# So there is no need to pre-install any dependency packages here and possibly induce conflicts.

FROM cgr.dev/chainguard/wolfi-base
# Thanks to Nuno do Carmo for the initial prototype

Expand All @@ -8,52 +20,13 @@ LABEL com.github.containers.toolbox="true" \

COPY ./toolboxes/packages.wolfi /toolbox-packages

# Update image & add dependencies
# Update image
RUN apk update && \
apk upgrade

# Add Distrobox specific packages
# Remove procps due to conflict with coreutils
RUN apk del procps && \
apk add sudo-rs \
coreutils \
bash \
bzip2 \
curl \
diffutils \
findmnt \
findutils \
git \
gpg \
iproute2 \
iputils \
keyutils \
libcap \
ncurses \
ncurses-terminfo \
net-tools \
openssh-client \
posix-libc-utils \
rsync \
tcpdump \
tree \
umount \
util-linux \
util-linux-misc \
wget \
xz \
zip

# Set up dependencies
RUN git clone https://github.com/89luca89/distrobox.git --single-branch /tmp/distrobox && \
cp /tmp/distrobox/distrobox-host-exec /usr/bin/distrobox-host-exec && \
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 && \

# Add optional packages
RUN grep -v '^#' /toolbox-packages | xargs apk add

RUN rm /toolbox-packages

# Change root shell to BASH
Expand Down
7 changes: 1 addition & 6 deletions toolboxes/packages.wolfi
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
apk-tools
bash
curl
git
posix-libc-utils
su-exec
vim
nano

0 comments on commit ea9e11d

Please sign in to comment.