Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First attempt at an Ubuntu toolbox container image. #298

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions images/ubuntu/19.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM docker.io/library/ubuntu:19.04

ENV NAME=ubuntu-toolbox VERSION=19.04
LABEL com.github.debarshiray.toolbox="true" \
kronenpj marked this conversation as resolved.
Show resolved Hide resolved
com.redhat.component="$NAME" \
kronenpj marked this conversation as resolved.
Show resolved Hide resolved
name="$FGC/$NAME" \
kronenpj marked this conversation as resolved.
Show resolved Hide resolved
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 <rishi@fedoraproject.org>"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I convince you to be the maintainer of these Ubuntu images? :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not, I only use Centos and Fedora. Debian and its derivatives aren't anything I work with normally. I really just did this one as a demonstration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

Before we announce support for Ubuntu, we would need somebody who cares enough about Ubuntu to ensure that Toolbox keeps working on a day to day basis with Ubuntu hosts and images. I am a little apprehensive of taking up that responsibility myself. I could, but it seems wise to spread the load around a bit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, in the meantime, we can work towards removing the rough edges before thinking of making any announcements. :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me.


COPY README.md /

RUN apt-get update

RUN apt-get -y upgrade

COPY extra-packages /
RUN apt-get -y install $(cat extra-packages | xargs)
kronenpj marked this conversation as resolved.
Show resolved Hide resolved
RUN rm /extra-packages

RUN sed -i -e 's/ ALL$/ NOPASSWD:ALL/' /etc/sudoers
kronenpj marked this conversation as resolved.
Show resolved Hide resolved

# Restore documentation
RUN yes | /usr/local/sbin/unminimize
RUN apt-get clean

RUN echo VARIANT_ID=container >> /etc/os-release
kronenpj marked this conversation as resolved.
Show resolved Hide resolved
RUN touch /etc/localtime

CMD /bin/sh
41 changes: 41 additions & 0 deletions images/ubuntu/19.04/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<img src="data/logo/toolbox-logo-landscape.svg" alt="Toolbox logo landscape" width="800"/>
kronenpj marked this conversation as resolved.
Show resolved Hide resolved

[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-<version-id>`.

### Enter the toolbox:
```
[user@hostname ~]$ toolbox enter
⬢[user@toolbox ~]$
```
18 changes: 18 additions & 0 deletions images/ubuntu/19.04/extra-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
bash-completion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious. Did you check that these packages are the ones missing from the Ubuntu base image that are necessary to replicate the command line user experience on a usual Ubuntu host?

To be honest, I am not sure what's the most future-proof option here. We started off by trying to replicate the default Fedora Workstation/Silverblue CLI UX in the Toolbox images. However, now that we are adding other distributions, and supporting different variants of Fedora other than Silverblue and Workstation, I don't know what a freshly created container should have.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's part of the reason I don't want to maintain the Ubuntu toolbox image. I don't actually use the distribution, so I can't say what a "usual" user experience would be for it.

git
keyutils
libcap2-bin
lsof
man-db
mlocate
mtr
packagekit-command-not-found
kronenpj marked this conversation as resolved.
Show resolved Hide resolved
rsync
sudo
tcpdump
time
traceroute
tree
unzip
wget
zip