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

基础命令篇

  • 从Github导入自己的ssh公钥
    echo $(curl https://github.com/GZTimeWalker.keys) >> ~/.ssh/authorized_keys

Docker 篇

  • 查看全部容器的IP地址

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

    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