Start up the Docker container from image:
docker run --entrypoint "/bin/bash" --rm imagename:latest -c "sleep 24h"
Obtain the container hash id:
docker ps
Log into the running container
docker exec -ti containerid bash
Output logs of the container
docker logs -f containerid
docker rmi -f $(docker images -f "dangling=true" -q)