此文篇博客仅作使用笔记的记录,并不具有教程性质!

使用篇

  • 查看全部容器的IP地址

    1
    docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
  • Run Asp.NET Core App with HTTPS

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    docker run -it
    --rm
    -p 80:80 -p 443:443
    -e ASPNETCORE_URLS="https://+;http://+"
    -e ASPNETCORE_HTTPS_PORT=443
    -e ASPNETCORE_Kestrel__Certificates__Default__Password="{cert pwd}"
    -e ASPNETCORE_Kestrel__Certificates__Default__Path=/app/cert.pfx
    -v /home/www/gzctf/cert.pfx:/app/cert.pfx
    -v /home/www/gzctf/appsettings.json:/app/appsettings.json
    -v /home/www/gzctf/log/:/app/log/
    --name GZCTF -h GZCTF
    -d registry.cn-hangzhou.aliyuncs.com/gztime/gzctf:latest