From 3148472fb9aa95258d36a8aaf05a2f1848111e0c Mon Sep 17 00:00:00 2001 From: Paul Kronenwetter Date: Sun, 6 Oct 2019 18:03:54 -0400 Subject: [PATCH 1/3] First attempt at a CentOS-7 toolbox container. Signed-off-by: Paul Kronenwetter --- images/centos/7/Dockerfile | 31 +++++++++++++++++++++++++ images/centos/7/README.md | 41 ++++++++++++++++++++++++++++++++++ images/centos/7/extra-packages | 28 +++++++++++++++++++++++ images/centos/7/missing-docs | 20 +++++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 images/centos/7/Dockerfile create mode 100644 images/centos/7/README.md create mode 100644 images/centos/7/extra-packages create mode 100644 images/centos/7/missing-docs diff --git a/images/centos/7/Dockerfile b/images/centos/7/Dockerfile new file mode 100644 index 000000000..ed45db915 --- /dev/null +++ b/images/centos/7/Dockerfile @@ -0,0 +1,31 @@ +FROM docker.io/library/centos:7 + +ENV NAME=centos-toolbox VERSION=7 +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 CentOS 7 toolbox containers" \ + maintainer="Debarshi Ray " + +COPY README.md / + +RUN sed -i '/tsflags=nodocs/d' /etc/yum.conf +#RUN yum -y swap coreutils coreutils-full +RUN yum -y upgrade + +COPY missing-docs / +RUN yum -y reinstall $(> /etc/os-release +RUN ln -s /etc/os-release /usr/lib/os-release + +CMD /bin/sh diff --git a/images/centos/7/README.md b/images/centos/7/README.md new file mode 100644 index 000000000..9d3f86625 --- /dev/null +++ b/images/centos/7/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/centos/7/extra-packages b/images/centos/7/extra-packages new file mode 100644 index 000000000..b0af5f35d --- /dev/null +++ b/images/centos/7/extra-packages @@ -0,0 +1,28 @@ +bash-completion +bzip2 +git +gnupg2-smime +keyutils +less +lsof +man-db +man-pages +mlocate +mtr +openssh-clients +openssl +PackageKit-command-not-found +pigz +rpm-plugin-systemd-inhibit +rsync +sudo +tcpdump +time +traceroute +tree +unzip +vte-profile +wget +which +words +zip diff --git a/images/centos/7/missing-docs b/images/centos/7/missing-docs new file mode 100644 index 000000000..cec1c37b6 --- /dev/null +++ b/images/centos/7/missing-docs @@ -0,0 +1,20 @@ +acl +bash +chkconfig +curl +dbus +yum +gawk +grep +gzip +info +libcap +nss +p11-kit +pam +pkgconfig +python +rpm +sed +systemd +tar From f4327d59dc8b55bf03fe56361b144b128db3c8c0 Mon Sep 17 00:00:00 2001 From: Paul Kronenwetter Date: Tue, 29 Oct 2019 18:16:02 -0400 Subject: [PATCH 2/3] Adding com.github.containers.toolbox label. --- images/centos/7/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/images/centos/7/Dockerfile b/images/centos/7/Dockerfile index ed45db915..fd2fae457 100644 --- a/images/centos/7/Dockerfile +++ b/images/centos/7/Dockerfile @@ -1,7 +1,8 @@ FROM docker.io/library/centos:7 ENV NAME=centos-toolbox VERSION=7 -LABEL com.github.debarshiray.toolbox="true" \ +LABEL com.github.containers.toolbox="true" \ + com.github.debarshiray.toolbox="true" \ com.redhat.component="$NAME" \ name="$FGC/$NAME" \ version="$VERSION" \ From fe427139b1508d26acefc9d21427283f9b353fd1 Mon Sep 17 00:00:00 2001 From: Paul Kronenwetter Date: Fri, 13 Mar 2020 18:01:19 -0400 Subject: [PATCH 3/3] Rearranging yum commands to reduce image size. --- images/centos/7/Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/images/centos/7/Dockerfile b/images/centos/7/Dockerfile index fd2fae457..fe234bd09 100644 --- a/images/centos/7/Dockerfile +++ b/images/centos/7/Dockerfile @@ -13,19 +13,17 @@ LABEL com.github.containers.toolbox="true" \ COPY README.md / RUN sed -i '/tsflags=nodocs/d' /etc/yum.conf -#RUN yum -y swap coreutils coreutils-full -RUN yum -y upgrade COPY missing-docs / -RUN yum -y reinstall $(> /etc/os-release RUN ln -s /etc/os-release /usr/lib/os-release