Start A Container

Create Container

Create a Docker container (docker create) from the image python:3.8-slim. Then save the output as a variable (CID=$()).

This works because upon completion docker create outputs the unique container ID to stout.

CID=$(docker create python:3.8-slim)

Start Container

Start the Docker container (docker start) with the container ID specified by CID ($CID)

# With root privileges, start the Container that has 
# the container ID defined in the variable CID
docker start $CID