Skip to content

Instantly share code, notes, and snippets.

@K4rakara
Created May 2, 2022 01:59
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save K4rakara/356ccf425575f31bc664e4541681595f to your computer and use it in GitHub Desktop.
Ubuntu Toolbox
podman build -t ubuntu-toolbox - < ubuntu-toolbox.dockerfile
FROM docker.io/library/ubuntu:latest
ENV \
NAME=ubuntu-toolbox \
VERSION=latest
LABEL \
name="$NAME" \
version="$VERSION" \
usage="This image is meant to be used with toolbox" \
summary="Base image for creating Ubuntu toolbox containers" \
com.github.containers.toolbox="true"
# Update apt
RUN \
apt update --assume-yes 2>/dev/null \
&& apt upgrade --assume-yes 2>/dev/null
# Required by toolbox
RUN \
apt install --assume-yes libcap2-bin libnss-myhostname sudo 2>/dev/null \
&& echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/toolbox
# Unminimize image
RUN yes | unminimize
# Clean apt cache
RUN apt-get clean 2>/dev/null
CMD ["sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment