- I used some of these commands while setting up the docker image used by Draco's Travis CI system.
docker pull ubuntu:latest
docker run --name draco-travis-ci -it ubuntu:latest bash
docker commit -m "First cut Ubuntu image for Draco CI" -a kinetictheory draco-travis-ci kinetictheory/draco-travis-ci:latest # queues for upload
docker login
docker push kinetictheory/draco-travis-ci
docker build --rm --pull --tag draco-travis-ci:latest .
docker commit -m "blah" -a kinetictheory draco-travis-ci kinetictheory/draco-travis-ci:latest # queues for upload
docker login -u kinetictheory (and password)
docker push kinetictheory/draco-travis-ci
Run an interactive session
docker login -u kinetictheory (and password)
docker pull kinetictheory/draco-travis-ci
docker run -it kinetictheory/draco-travis-ci /bin/bash -l
More advanced: run a script from the image
docker run [it] -v f:\work\draco:/home/travis/draco -w /home/travis/draco kinetictheory/draco-travis-ci /bin/bash -l -c "./.travis-run-tests.sh"
- Options that can be added to the above command:
-v windows_loc:unix_mount
-
-d
# detach
Query local docker images
docker ps -aq
docker rm <hash>
#docker exec -it draco-travis-ci $CMD
#docker kill draco-travis-ci