1.2 KiB
1.2 KiB
Docker
Assume you use Archlinux.
Read Docker.
Read LinuxServer.io/Docs.
Start/enable service:
systemctl start docker.service
systemctl enable docker.service
Add your user to docker
group:
sudo usermod -aG docker $USER
Delete all images, containers, volumes, and networks that are not associated with a container (dangling):
docker system prune
Read docker run.
option | example | explain |
---|---|---|
-i |
Keep STDIN open even if not attached | |
--name |
||
-p |
-p 8080:80 |
Publish container port : host port |
--rm |
||
-t |
Allocate a pseudo-TTY | |
-v |
-v ~/abc:/abc |
Bind host directory : container directory |
Run ubuntu
image:
docker run --rm -it ubuntu