Tobias Erdle's Blog

Development Engineer working with different technologies. Former Jakarta MVC & Eclipse Krazo Committer. All views are my own.

Github: erdlet | E-Mail: blog (at) erdlet (punkt) de

docker run for bootstrapping simple testing containers

Even if I knew that this command exists, I've seldom used docker run to bootstrap a container for simple testing tasks like creating the scripts for GitLab pipeline jobs etc. Anyway, just to remind myself I'll note some helpful docker run statements here:

# Bootstrap simple arch linux

# Run plain Arch linux container named 'sandbox-arch' and start interactive bash. Cleanup afterwards.
docker run --rm -it --name sandbox-arch archlinux:latest bash

# Run JDK 17 / Maven container based on Ubuntu named 'sandbox-maven' and start interactive bash. Cleanup afterwards.
docker run --rm -it --name sandbox-maven maven:3.8.6-eclipse-temurin-17 bash