sudo docker run --name java -d -p 19992:22 -p 9992:8080 hub.c.163.com/public/ubuntu:16.04-tools # 能夠映射多個端口到外部 sudo docker exec -it java /bin/bash passwd root # 修改密碼 nano /etc/ssh/sshd_config PermitRootLogin yes PasswordAuthentication yes /etc/init.d/ssh restart
[program:nginx] command = /usr/sbin/nginx -g 'daemon off;' startsecs=0 autostart=true autorestart=true stdout_logfile=/var/log/nginx_sup.log stopasgroup=true killasgroup=true
[program:dotnet_webapi_32395] command=dotnet WebHost.dll --urls=http://0.0.0.0:32395 directory=/data/pt7d_webapi stderr_logfile=/var/log/dotnet_webapi.error.log stdout_logfile=/var/log/dotnet_webapi.stdout.log environment=ASPNETCORE_ENVIRONMENT=Production user=root stopsignal=INT autostart=true autorestart=true startsecs=3
[inet_http_server] ; inet (TCP) server disabled by default port=0.0.0.0:9991 ; (ip_address:port specifier, *:port for all iface) username=username ; (default is no username (open server)) password=password ; (default is no password (open server))
打開瀏覽器訪問 http://ip:9991java