docker-compose.yml เป็น Docker Command

blog Jun 01, 2020
generate docker command from docker compose
convert docker compose to docker command, docker compose convert to docker run command, docker compose example
  • ตัวอย่าง การ docker-compose.yaml ที่จะใช้
version: "3.7"
services:
    db:
        image: mariadb:10.1
        container_name: lemp_mariadb
        restart: always
        volumes:
            - ./mysql/data/:/var/lib/mysql
        environment:
            - MYSQL_ROOT_PASSWORD=root
        ports:
            - 3306:3306 
    php:
        build: ./
        container_name: lemp_php-fpm
        restart: always
        volumes:
            - ./www/:/var/www/
        expose:
            - "9000"
    nginx:
        image: nginx:alpine
        container_name: lemp_nginx
        restart: always
        volumes:
            - ./nginx/conf.d:/etc/nginx/conf.d:ro
        volumes_from:
            - php
        ports:
            - 80:80

  • จากนั้นเอาไปวางในเว็บของเขา

กด Generate docker run

จะได้ประมาณนี้

  • แค่นี้เลย ไม่มีไรมาก 5555

Ref :

generate docker command from docker compose
convert docker compose to docker command, docker compose convert to docker run command, docker compose example
Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.