-
docker build -t name .
- builds container from image with name
- looks at Dockerfile
-
docker run
,docker run -it -p 3200:80 -e ENV=QA legacy
- looks at Dockerfile
-it
interactive terminal, -p port, -e env variables- starts container created from
docker build
-
docker-compose up
docker-compose.yml
- way to define and manage multiple containers that may depend on each other
-
layer caching in Dockerfile
- put things that change most often at the bottom
-
networking
-p 3200:80
host_port:docker_local_port
-
env variables
- env variables should come from
docker-compose.yml
for local dev - in prod, they should come from the environment
- env variables should come from
-
docker ps -a
- list all containers -
docker ps
- list all running containers -
get container id from ps command
docker inspect :id
- lots of info about containerdocker logs :id
- logs
Last active
April 25, 2018 19:59
-
-
Save steezeburger/d6f34097d42daa5669d22077738cbc01 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment