Docker容器技术

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

2022-01-24  本文已影响0人  InsaneLoafer

下载示例代码

解压后创建.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 配置扫描

上一篇下一篇

猜你喜欢

热点阅读