User Tools

Site Tools


docker

CargOS

Proxmox / LXC

# Allow running Docker inside LXC
lxc.aa_profile = unconfined
lxc.cap.drop = mac_override sys_time sys_module sys_rawio

Note: this affect security!

Docker

Data directory

/var/lib/docker
/var/lib/docker/vfs/dir
/var/lib/docker/volumes

Show info

docker info

Get image from repository

docker pull centos

Run image in background

docker run -d -e VARIABLE=CONTENT -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 222:22 centos
--rm remove after
--name INSTANCE_NAME
-it interactive

Show running / images / stats

docker ps
docker ps -a
docker images
docker stats {container}

Return info about container in JSON

docker inspect {container}

Enter / Stop / Start Container

docker attach {container}
docker stop {container}
docker start {container}

Map directory

-v /home/user:/home/user:ro -u 500:500
docker.txt · Last modified: 2017/04/21 12:24 by Jan Forman