Docker Compose Example for Database

作者:

分類:
services:
    mssql:
        image: mcr.microsoft.com/mssql/server:2022-latest
        restart: always
        ports:
            - 1433:1433
        volumes:
            - mssql:/var/opt/mssql
        environment:
            ACCEPT_EULA: "Y"
            MSSQL_PID: "Express"
            MSSQL_SA_PASSWORD: "password"
    postgres:
        image: docker.io/library/postgres:latest
        restart: always
        ports:
            - 5432:5432
        volumes:
            - postgres:/var/lib/postgresql
        environment:
            POSTGRES_PASSWORD: "password"
    oracle:
        image: container-registry.oracle.com/database/free:latest-lite
        restart: always
        ports:
            - 1521:1521
        volumes:
            - oracle:/opt/oracle
        environment:
            ORACLE_PWD: "password"
    mysql:
        image: docker.io/library/mysql:latest
        restart: always
        ports:
            - 3306:3306
        volumes:
            - mysql:/var/lib/mysql
        environment:
            MYSQL_ROOT_PASSWORD: "password"
    mongo:
        image: docker.io/mongodb/mongodb-community-server:latest
        restart: always
        ports:
            - 27017:27017
        volumes:
            - mongo:/data/db
        environment:
            MONGODB_INITDB_ROOT_USERNAME: "root"
            MONGODB_INITDB_ROOT_PASSWORD: "password"
volumes:
    mssql:
    postgres:
    oracle:
    mysql:
    mongo:

留言

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *