first row
This commit is contained in:
31
docker_commands
Normal file
31
docker_commands
Normal file
@@ -0,0 +1,31 @@
|
||||
docker container run -ti -d -p 127.0.0.1:8080:80 --name nginx nginx:1.19.3
|
||||
curl http://127.0.0.1:8080
|
||||
docker exec -ti nginx /bin/sh
|
||||
apt update
|
||||
apt install -y iproute2
|
||||
apt install -y procps
|
||||
# show separate process namespace
|
||||
ps -ef
|
||||
# show separate network namespace
|
||||
ip a s
|
||||
exit
|
||||
|
||||
# show host process and network interfaces
|
||||
ps -ef
|
||||
ip a s
|
||||
|
||||
# commit tools
|
||||
docker container stop nginx
|
||||
docker container commit $(docker container ls -lq) nginx:1.19.3-tools
|
||||
docker image ls
|
||||
docker image history nginx:1.19.3-tools
|
||||
docker container start nginx
|
||||
|
||||
ps fax
|
||||
5006 ? Sl 0:00 \_ /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 49154 -container-ip 172.1
|
||||
7343 ? Sl 0:01 /usr/bin/containerd-shim-runc-v2 -namespace moby -id 6e0451b73ddbfae0976a5146e6cda92c
|
||||
7366 ? Ss 0:00 \_ nginx: master process nginx -g daemon off;
|
||||
7425 ? S 0:00 \_ nginx: worker process
|
||||
7426 ? S 0:00 \_ nginx: worker process
|
||||
7427 ? S 0:00 \_ nginx: worker process
|
||||
7428 ? S 0:00 \_ nginx: worker process
|
||||
Reference in New Issue
Block a user