Docker cheat sheet

A few commands commonly used to create, configure, or access docker containers

Start a new MariaDB container:

docker run -p 3306:3306 --name mariadb -e MYSQL_ROOT_PASSWORD="" -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=true -d

SSH to a running docker container

docker exec -it  <container name> /bin/bash

View running containers:

docker ps

View stopped/inactive containers:

docker ps -a

Leave a Reply

Your email address will not be published. Required fields are marked *