美文网首页Docker容器技术
七十三、容器安全-Docker运行环境检查

七十三、容器安全-Docker运行环境检查

作者: InsaneLoafer | 来源:发表于2022-01-24 20:15 被阅读0次

    下载示例代码

    • 示例代码下载(flask + redis healthcheck) 本节源码

    解压后创建.evn文件

    [vagrant@swarm-manager ~]$ sudo unzip compose-healthcheck-redis.zip
    Archive:  compose-healthcheck-redis.zip
       creating: compose-healthcheck-redis/
      inflating: compose-healthcheck-redis/.dockerignore
     extracting: compose-healthcheck-redis/.env
     extracting: compose-healthcheck-redis/.gitignore
      inflating: compose-healthcheck-redis/docker-compose.yml
       creating: compose-healthcheck-redis/flask/
      inflating: compose-healthcheck-redis/flask/app.py
      inflating: compose-healthcheck-redis/flask/Dockerfile
       creating: compose-healthcheck-redis/nginx/
      inflating: compose-healthcheck-redis/nginx/nginx.conf
      inflating: compose-healthcheck-redis/README.md
    [vagrant@swarm-manager compose-healthcheck-redis]$ more .env
    REDIS_PASSWORD=ABC123
    

    构建镜像并启动

    docker-compose pull
    docker-compose up -d
    

    Docker 配置扫描

    相关文章

      网友评论

        本文标题:七十三、容器安全-Docker运行环境检查

        本文链接:https://www.haomeiwen.com/subject/vwolcrtx.html