Installation
https://docs.docker.com/engine/getstarted/step_one/Examples
Run nginx containerdocker run -d -p 80:80 --name webserver nginx
List all docker images
docker images
docker ps
docker cp html.tar 213389b682d6:/tmp/
docker exec -it 213389b682d6 /bin/bash
docker commit -m "Adding ops runbook" -a "Igor" 213389b682d6 runbook
docker run -d -p 80:80 -it runbook /bin/bash
docker exec -it 7e7d9c35a216 bash
Ctrl + p , Ctrl + q
Restart nginx inside your container
docker exec -it 213389b682d6 /etc/init.d/nginx restart
root@ecs00-us-west-2b:~# docker start ecs-agent
Logging
It seems like docker puts logs in two places:- Actual container logs
/var/lib/docker/containers
- docker system log
/var/log/docker.log
/etc/default/docker
DOCKER_OPTS="--pidfile=/var/run/docker.pid --log-level=warning --log-opt max-size=1g --storage-driver=zfs --storage-opt=zfs.fsname=zd0/containers"
No comments:
Post a Comment