Skip to content

Commit

Permalink
Merge pull request #84 from ublue-os/ubuntu-upstream
Browse files Browse the repository at this point in the history
feat: build ubuntu from upstream
  • Loading branch information
castrojo authored Apr 28, 2024
2 parents b20bf78 + 8ce5f5f commit e149582
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 64 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-ubuntu-toolbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
- name: Checkout Push to Registry action
uses: actions/checkout@v4

- name: Verify Ubuntu toolbox
uses: EyeCantCU/cosign-action/[email protected]
with:
containers: ubuntu-toolbox:22.04
pubkey: https://raw.githubusercontent.com/toolbx-images/images/main/quay.io-toolbx-images.pub
registry: quay.io/toolbx-images
# - name: Verify Ubuntu toolbox
# uses: EyeCantCU/cosign-action/[email protected]
# with:
# containers: ubuntu-toolbox:22.04
# pubkey: https://raw.githubusercontent.com/toolbx-images/images/main/quay.io-toolbx-images.pub
# registry: quay.io/toolbx-images

# Build metadata
- name: Image Metadata
Expand Down
44 changes: 26 additions & 18 deletions toolboxes/ubuntu-toolbox/Containerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
FROM quay.io/toolbx-images/ubuntu-toolbox:22.04
# From https://github.com/toolbx-images/images/tree/main/ubuntu/22.04
FROM docker.io/library/ubuntu:24.04
# FROM https://hub.docker.com/_/ubuntu

LABEL com.github.containers.toolbox="true" \
usage="This image is meant to be used with the toolbox or distrobox command" \
summary="A cloud-native terminal experience powered by Ubuntu" \
maintainer="[email protected]"
name="ubuntu-toolbox" \
usage="This image is meant to be used with the toolbox or distrobox command" \
summary="A cloud-native terminal experience powered by Ubuntu" \
maintainer="[email protected]"

COPY ./toolboxes/ubuntu-toolbox/packages.ubuntu /toolbox-packages

RUN apt-get update && \
apt-get upgrade -y && \
RUN rm /etc/apt/apt.conf.d/docker-gzip-indexes /etc/apt/apt.conf.d/docker-no-languages && \
sed -Ei 's/^(hosts:.*)(\<files\>)\s*(.*)/\1\2 myhostname \3/' /etc/nsswitch.conf && \
sed -Ei '/apt-get (update|upgrade)/s/^/#/' /usr/local/sbin/unminimize && \
apt-get update && \
yes | /usr/local/sbin/unminimize && \
DEBIAN_FRONTEND=noninteractive apt-get -y install \
$(cat toolbox-packages | xargs) && \
rm -rd /var/lib/apt/lists/*

RUN rm /toolbox-packages

RUN 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

RUN echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
ubuntu-minimal ubuntu-standard \
libnss-myhostname \
flatpak-xdg-utils \
$(cat toolbox-packages | xargs) && \
rm -rd /var/lib/apt/lists/* && \
rm /toolbox-packages && \
mkdir /usr/share/empty && \
userdel --remove ubuntu && \
rm /etc/apt/apt.conf.d/20apt-esm-hook.conf && \
ln -s /usr/libexec/flatpak-xdg-utils/flatpak-spawn /usr/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 && \
echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
110 changes: 70 additions & 40 deletions toolboxes/ubuntu-toolbox/packages.ubuntu
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
apt-utils
bash-completion
bc
bzip2
ca-certificates
curl
dbus-x11
direnv
fzf
libegl1-mesa
libgl1-mesa-glx
libvte-common
make
neofetch
plocate
progress
apt-utils
dialog
diffutils
direnv
dirmngr
findutils
fish
fzf
gnupg
gnupg2
gnupg-l10n
gnupg-utils
gnupg2
gpg
ca-certificates
libnsl2
libpython3-stdlib
gpg-agent
gpgconf
gpgsm
gpg-wks-client
gpg-wks-server
gpgsm
libksba8
libnpth0
libpython3.11-minimal
gpgconf
libnss-myhostname
libsqlite3-0
libtirpc-common
libtirpc3
libvte-2.91-common
openssl
lsof
pinentry-curses
time
libpython3.11-stdlib
libvulkan1
media-types
mesa-vulkan-drivers
hostname
iproute2
iputils-ping
keyutils
language-pack-en
less
libbsd0
libcap2-bin
libdrm2
libdrm-amdgpu1
libdrm-common
libdrm-nouveau2
libdrm-radeon1
libdrm2
libedit2
libegl-mesa0
libegl1
libegl1-mesa
libegl-mesa0
libelf1
libexpat1
libgbm1
libgl1
libgl1-amber-dri
libgl1-mesa-dri
libgl1-mesa-glx
libglapi-mesa
libglvnd0
libglx-mesa0
libglx0
libicu70
libglx-mesa0
libkrb5-3
libksba8
libllvm15
libnpth0
libnsl2
libnss-mdns
libnss-myhostname
libpciaccess0
libsensors-config
libpython3-stdlib
libsensors5
libsensors-config
libsqlite3-0
libtirpc3
libtirpc-common
libvte-2.91-common
libvte-2.9*-common
libvte-common
libvulkan1
libwayland-client0
libwayland-server0
libx11-6
libx11-data
libx11-xcb1
libxau6
libxcb1
libxcb-dri2-0
libxcb-dri3-0
libxcb-glx0
Expand All @@ -81,9 +81,39 @@ libxcb-randr0
libxcb-shm0
libxcb-sync1
libxcb-xfixes0
libxcb1
libxdmcp6
libxext6
libxfixes3
libxml2
locales
lsof
make
man-db
manpages
media-types
mesa-vulkan-drivers
mtr
ncurses-base
neofetch
openssh-client
openssl
passwd
pigz
pinentry-curses
plocate
procps
progress
rsync
sudo
tcpdump
time
traceroute
tree
tzdata
unzip
util-linux
wget
xauth
xz-utils
zip
zsh

0 comments on commit e149582

Please sign in to comment.