From 330c86c465b08d550303f6015f8b3113db8c7435 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sat, 19 Oct 2024 16:32:52 -0500 Subject: [PATCH] second commit --- .gitignore | 1 + Containerfile | 26 ++++++++++++++++++++++++++ Makefile | 5 +++++ README.md | 27 +++++++++++++++++++++++++++ extra-packages | 26 ++++++++++++++++++++++++++ my-extra-packages | 8 ++++++++ 6 files changed, 93 insertions(+) create mode 100644 .gitignore create mode 100644 Containerfile create mode 100644 Makefile create mode 100644 README.md create mode 100644 extra-packages create mode 100644 my-extra-packages diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..03ee9b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.task.mk diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..37f926b --- /dev/null +++ b/Containerfile @@ -0,0 +1,26 @@ +FROM docker.io/library/archlinux:base-devel + +LABEL com.github.containers.toolbox="true" \ + name="daylinbox" \ + version="base-devel" \ + usage="This image is meant to be used by daylin" \ + maintainer="Daylin Morgan " + # summary="Base image for creating Arch Linux Toolbx containers" \ + +# Install extra packages +COPY extra-packages my-extra-packages / +RUN pacman -Syu --needed --noconfirm - < extra-packages +RUN pacman -Syu --needed --noconfirm - < my-extra-packages +RUN rm /extra-packages /my-extra-packages + +# Enable man pages, enable progress bars +RUN sed -i -e 's/NoProgressBar/#NoProgressBar/' -e 's/NoExtract/#NoExtract/' /etc/pacman.conf + +# Force reinstall of packages which have man pages (shouldn't redownload any that were just upgraded) +RUN mkdir -p /usr/share/man && pacman -Qo /usr/share/man | awk '{print $5}' | xargs pacman -S --noconfirm man-db + +# Clean up cache +RUN yes | pacman -Scc + +# Enable sudo permission for wheel users +RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/toolbox diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..19a1121 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +build: ## build the image! + podman build . -t daylinbox + +-include .task.mk +$(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v2024.1001/task.mk -o .task.mk)) diff --git a/README.md b/README.md new file mode 100644 index 0000000..6c0a61b --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# daylinbox + +Container definition for use with [distrobox](https://github.com/89luca89/distrobox). +It's loosely based on the existing container defined [here](https://github.com/containers/toolbox/blob/dcd4c4382c912f98c60e7abccc3de7aa8f786bdf/images/arch/Containerfile). + +To use ensure `podman` is installed. +Then build the image: + +```sh +make build +``` + +Then create and enter a distrobox: + +```sh +distrobox create -i daylinbox +distrobox enter daylinbox +``` + +`./extra-packages` was copied over from the original container build. +`./my-extra-packages` is the list of tools I want around in these containers. + +## possible future improvements + +- addition of `pixi` +- make microsoft build and host the image? + diff --git a/extra-packages b/extra-packages new file mode 100644 index 0000000..545eec4 --- /dev/null +++ b/extra-packages @@ -0,0 +1,26 @@ +bash-completion +diffutils +flatpak-xdg-utils +git +gnupg +keyutils +lsof +man-db +man-pages +mlocate +mtr +nss-mdns +openssh +pigz +procps-ng +rsync +tcpdump +time +traceroute +tree +unzip +vte-common +wget +words +xorg-xauth +zip diff --git a/my-extra-packages b/my-extra-packages new file mode 100644 index 0000000..33ee172 --- /dev/null +++ b/my-extra-packages @@ -0,0 +1,8 @@ +python +neovim +fd +ripgrep +zoxide +fzf +eza +lazygit