docker run → Compose

O's World

Convert a docker run command into a docker-compose.yaml service, locally in your browser.

docker-compose.yaml
services:
web:
image: "nginx:alpine"
container_name: web
restart: unless-stopped
ports:
- "8080:80"
volumes:
- "./html:/usr/share/nginx/html:ro"
environment:
- "TZ=Asia/Shanghai"

FAQ