10分钟学会docker-compose.yml

HemingwayM 2020-02-03

docker-compose.yml示例:
version: ‘3‘
services:
    db:
        hostname: db
        image: mysql:5
        command: --default-authentication-plugin=mysql_native_password
        ports:
            - 3306:3306
        environment:
            MYSQL_DATABASE: starter
            MYSQL_ROOT_PASSWORD: root

    api:
        image: starter_api:latest
        build: .
        ports:
            - 8011:8011
        depends_on:
            - db

docker-compose.yml常用指令:

10分钟学会docker-compose.yml
10分钟学会docker-compose.yml

相关推荐