Skip to content

Mireiawen/debian

Repository files navigation

Customized "fat" Debian Docker image with bunch of tools for testing and development.

This image is built on top of the Debian and includes bunch of tools for testing, such as basic build toolchain. This is by no means a small container, and it quite likely contains unnecessary attack surface for application specific containers. As such is quite unlikely suitable for production application container base, but it can be useful for developing and debugging before the production phase.

Personally I am using it a lot to separate applications from each other when testing things so that different instances don't mess up with each other while they store authentication, cache or similar data to the home directory.

Building

There is automated build that builds the image to the Docker hub, available as mireiawen/debian.

You can build customized image for your user by running the build.sh in the repository root. This requires that you have Jinja2 CLI installed. This will create image named as mireiawen/debian:<your username> where you can run the commands as normal user instead of the root user.

Running

Running the container is like starting up any interactive container, it starts with the bash shell:

docker run \
        --rm \
        --interactive \
        --tty \
        mireiawen/debian

Running as normal user requires that you build customized image in some way. There is helper script available to create that automatically, as described in the Build step. To run as normal user, just run the created container. There is helper script start-container to run the container created with helper script and specify some options.

start-container -helper

Runs the container in interactive mode, and removes it after use. Tries to mount the Docker socket to the container for Docker in Docker -use. Note: GNU getopt is required to run the helper script.

Short option Long option Description
-m --mount-home Mount the current user home directory to the container and run the user container
-r --mount-home-readonly Mount the current user home directory to the container as read-only and run the user container
-u --user-tag Run the user container
-t <tag> --tag <tag> Run the container with specific tag
-e <key=value> --env <key=value> Add environment variables, like in Docker command. Can be specified multiple times
-v <volume> --volume <volume> Add volume, like in Docker --volume parameter. Script tries to parse the mount point and chown it recursively to the user when running with mount-home or mount-home-readonly. Can be specified multiple times

Available external tools

About

Customized Debian Docker image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published