docker run for bootstrapping simple testing containers
16 May 2023 - Tobias ErdleEven 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