Docker 基础

Dockerizing a Python Flask App

Install nginx 1.27.2

docker pull nginx:1.27.2
docker pull python:3.13
services:
  web:
    container_name: example_nginx
    image: nginx:1.27.2
    privileged: true
    ports:
      - 80:80
      - 443:443
    volumes:
      - "$PWD/html:/usr/share/nginx/html:rw"
      - "$PWD/conf/conf.d:/etc/nginx/conf.d"
      - "$PWD/logs:/var/log/nginx"
      - "$PWD/certs:/etc/nginx/certs"

自 …