docker 官方 nginx 怎么用
1个回答
展开全部
root@gerryyang:~/nginx_ubuntu# docker ps a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3fa70f39af75 ubuntu_sshd_gcc_nginx_gerry:14.04 "/run.sh" About an hour ago Up About an hour 0.0.0.0:30022->22/tcp, 0.0.0.0:30080->80/tcp, 0.0.0.0:30443->443/tcp distracted_wilson
101bc295b601 ubuntu_sshd_gcc_apache_gerry:14.04 "/run.sh" About an hour ago Up About an hour 0.0.0.0:20022->22/tcp, 0.0.0.0:20080->80/tcp suspicious_sinoussi
cec21c3c0a1f registry:latest "docker-registry" About an hour ago Up About an hour 0.0.0.0:5000->5000/tcp boring_torvalds
6906a758711c ubuntu_sshd_gcc_gerry:14.04 "/run.sh" About an hour ago Up About an hour 0.0.0.0:10022->22/tcp determined_kirch
root@gerryyang:~# docker exec -it 3fa /bin/bash
root@3fa70f39af75:/etc/nginx# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 17956 1408 ? Ss 23:04 0:00 /bin/bash /run.sh
root 8 0.0 0.4 85868 4088 ? S 23:04 0:00 nginx: master process /usr/sbin/nginx
root 9 0.0 0.1 61364 1192 ? Ss 23:04 0:00 /usr/sbin/sshd
www-data 10 0.0 0.2 86212 2276 ? S 23:04 0:00 nginx: worker process
www-data 11 0.0 0.1 86212 2020 ? S 23:04 0:00 nginx: worker process
www-data 12 0.0 0.1 86212 2020 ? S 23:04 0:00 nginx: worker process
www-data 13 0.0 0.1 86212 1764 ? S 23:04 0:00 nginx: worker process
root 14 0.1 0.1 18144 1868 ? S 23:56 0:00 /bin/bash
root 30 0.0 0.1 15568 1140 ? R+ 23:56 0:00 ps aux
root@3fa70f39af75:/etc/nginx# netstat -aunpt
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3fa70f39af75 ubuntu_sshd_gcc_nginx_gerry:14.04 "/run.sh" About an hour ago Up About an hour 0.0.0.0:30022->22/tcp, 0.0.0.0:30080->80/tcp, 0.0.0.0:30443->443/tcp distracted_wilson
101bc295b601 ubuntu_sshd_gcc_apache_gerry:14.04 "/run.sh" About an hour ago Up About an hour 0.0.0.0:20022->22/tcp, 0.0.0.0:20080->80/tcp suspicious_sinoussi
cec21c3c0a1f registry:latest "docker-registry" About an hour ago Up About an hour 0.0.0.0:5000->5000/tcp boring_torvalds
6906a758711c ubuntu_sshd_gcc_gerry:14.04 "/run.sh" About an hour ago Up About an hour 0.0.0.0:10022->22/tcp determined_kirch
root@gerryyang:~# docker exec -it 3fa /bin/bash
root@3fa70f39af75:/etc/nginx# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 17956 1408 ? Ss 23:04 0:00 /bin/bash /run.sh
root 8 0.0 0.4 85868 4088 ? S 23:04 0:00 nginx: master process /usr/sbin/nginx
root 9 0.0 0.1 61364 1192 ? Ss 23:04 0:00 /usr/sbin/sshd
www-data 10 0.0 0.2 86212 2276 ? S 23:04 0:00 nginx: worker process
www-data 11 0.0 0.1 86212 2020 ? S 23:04 0:00 nginx: worker process
www-data 12 0.0 0.1 86212 2020 ? S 23:04 0:00 nginx: worker process
www-data 13 0.0 0.1 86212 1764 ? S 23:04 0:00 nginx: worker process
root 14 0.1 0.1 18144 1868 ? S 23:56 0:00 /bin/bash
root 30 0.0 0.1 15568 1140 ? R+ 23:56 0:00 ps aux
root@3fa70f39af75:/etc/nginx# netstat -aunpt
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询