Fantastic IT Tools
Web & Dev

docker run → compose

Convert a docker run command into an equivalent docker-compose.yml.

docker run command

docker-compose.yml

services:
  web:
    image: nginx:latest
    container_name: web
    restart: unless-stopped
    ports:
      - 8080:80
    volumes:
      - /data:/usr/share/nginx/html
    environment:
      - TZ=UTC