From 46f447ad18b70d1e9da0fa06f5df06ec6787869d Mon Sep 17 00:00:00 2001 From: Paul Kronenwetter Date: Sun, 13 Oct 2019 18:50:34 -0400 Subject: [PATCH 1/3] First attempt at an Ubuntu toolbox container image. This isn't as clean as the fedora/centos variants. There's also a problem on first run where toolbox emits 'toolbox: failed to create /run/.toolboxenv in container' but runs normally from there. --- images/ubuntu/19.04/Dockerfile | 31 ++++++++++++++++++++++ images/ubuntu/19.04/README.md | 41 ++++++++++++++++++++++++++++++ images/ubuntu/19.04/extra-packages | 18 +++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 images/ubuntu/19.04/Dockerfile create mode 100644 images/ubuntu/19.04/README.md create mode 100644 images/ubuntu/19.04/extra-packages diff --git a/images/ubuntu/19.04/Dockerfile b/images/ubuntu/19.04/Dockerfile new file mode 100644 index 000000000..4a859c752 --- /dev/null +++ b/images/ubuntu/19.04/Dockerfile @@ -0,0 +1,31 @@ +FROM docker.io/library/ubuntu:19.04 + +ENV NAME=ubuntu-toolbox VERSION=19.04 +LABEL com.github.debarshiray.toolbox="true" \ + com.redhat.component="$NAME" \ + name="$FGC/$NAME" \ + version="$VERSION" \ + usage="This image is meant to be used with the toolbox command" \ + summary="Base image for creating Ubuntu 19.04 toolbox containers" \ + maintainer="Debarshi Ray " + +COPY README.md / + +RUN apt-get update + +RUN apt-get -y upgrade + +COPY extra-packages / +RUN apt-get -y install $(cat extra-packages | xargs) +RUN rm /extra-packages + +RUN sed -i -e 's/ ALL$/ NOPASSWD:ALL/' /etc/sudoers + +# Restore documentation +RUN yes | /usr/local/sbin/unminimize +RUN apt-get clean + +RUN echo VARIANT_ID=container >> /etc/os-release +RUN touch /etc/localtime + +CMD /bin/sh diff --git a/images/ubuntu/19.04/README.md b/images/ubuntu/19.04/README.md new file mode 100644 index 000000000..9d3f86625 --- /dev/null +++ b/images/ubuntu/19.04/README.md @@ -0,0 +1,41 @@ +Toolbox logo landscape + +[Toolbox](https://github.com/debarshiray/toolbox) is a tool that offers a +familiar RPM based environment for developing and debugging software that runs +fully unprivileged using [Podman](https://podman.io/). + +The toolbox container is a fully *mutable* container; when you see +`yum install ansible` for example, that's something you can do inside your +toolbox container, without affecting the base operating system. + +This is particularly useful on +[OSTree](https://ostree.readthedocs.io/en/latest/) based Fedora systems like +[Silverblue](https://silverblue.fedoraproject.org/). The intention of these +systems is to discourage installation of software on the host, and instead +install software as (or in) containers. + +However, this tool doesn't *require* using an OSTree based system — it +works equally well if you're running e.g. existing Fedora Workstation or +Server, and that's a useful way to incrementally adopt containerization. + +The toolbox environment is based on an [OCI](https://www.opencontainers.org/) +image. On Fedora this is the `fedora-toolbox` image. This image is used to +create a toolbox container that seamlessly integrates with the rest of the +operating system. + +## Usage + +### Create your toolbox container: +``` +[user@hostname ~]$ toolbox create +Created container: fedora-toolbox-30 +Enter with: toolbox enter +[user@hostname ~]$ +``` +This will create a container called `fedora-toolbox-`. + +### Enter the toolbox: +``` +[user@hostname ~]$ toolbox enter +⬢[user@toolbox ~]$ +``` diff --git a/images/ubuntu/19.04/extra-packages b/images/ubuntu/19.04/extra-packages new file mode 100644 index 000000000..c1876b5a6 --- /dev/null +++ b/images/ubuntu/19.04/extra-packages @@ -0,0 +1,18 @@ +bash-completion +git +keyutils +libcap2-bin +lsof +man-db +mlocate +mtr +packagekit-command-not-found +rsync +sudo +tcpdump +time +traceroute +tree +unzip +wget +zip From 15c3377fbcbcd38f458d01a62849d636ee54b811 Mon Sep 17 00:00:00 2001 From: Paul Kronenwetter Date: Mon, 14 Oct 2019 21:44:43 -0400 Subject: [PATCH 2/3] Update to first attempt at an Ubuntu toolbox container image. --- images/ubuntu/19.04/Dockerfile | 5 ++--- images/ubuntu/19.04/extra-packages | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/images/ubuntu/19.04/Dockerfile b/images/ubuntu/19.04/Dockerfile index 4a859c752..3549932a1 100644 --- a/images/ubuntu/19.04/Dockerfile +++ b/images/ubuntu/19.04/Dockerfile @@ -1,9 +1,8 @@ FROM docker.io/library/ubuntu:19.04 ENV NAME=ubuntu-toolbox VERSION=19.04 -LABEL com.github.debarshiray.toolbox="true" \ - com.redhat.component="$NAME" \ - name="$FGC/$NAME" \ +LABEL com.github.containers.toolbox="true" \ + name="$NAME" \ version="$VERSION" \ usage="This image is meant to be used with the toolbox command" \ summary="Base image for creating Ubuntu 19.04 toolbox containers" \ diff --git a/images/ubuntu/19.04/extra-packages b/images/ubuntu/19.04/extra-packages index c1876b5a6..0f705e37e 100644 --- a/images/ubuntu/19.04/extra-packages +++ b/images/ubuntu/19.04/extra-packages @@ -6,7 +6,6 @@ lsof man-db mlocate mtr -packagekit-command-not-found rsync sudo tcpdump From 69679f84eea5c4960f002f0364bf9c5cf9ef606b Mon Sep 17 00:00:00 2001 From: Paul Kronenwetter Date: Tue, 29 Oct 2019 17:57:26 -0400 Subject: [PATCH 3/3] Restoring "old" label. --- images/ubuntu/19.04/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/images/ubuntu/19.04/Dockerfile b/images/ubuntu/19.04/Dockerfile index 3549932a1..748af150a 100644 --- a/images/ubuntu/19.04/Dockerfile +++ b/images/ubuntu/19.04/Dockerfile @@ -2,6 +2,7 @@ FROM docker.io/library/ubuntu:19.04 ENV NAME=ubuntu-toolbox VERSION=19.04 LABEL com.github.containers.toolbox="true" \ + com.github.debarshiray.toolbox="true" \ name="$NAME" \ version="$VERSION" \ usage="This image is meant to be used with the toolbox command" \