1

I have the following docker-compose file:

version: '3.6'

services:
    mysql:
        image: mysql:5.7
        volumes:
            - "${DOCKER_VOLUMES_PATH}/mysql:/var/lib/mysql:cached"
        command: --sql_mode="NO_ENGINE_SUBSTITUTION"
        ports:
            - 3306:3306
        environment:
            - MYSQL_DATABASE=mcoins
            - MYSQL_USER=mcoins
            - MYSQL_PASSWORD=mcoins
            - MYSQL_ROOT_PASSWORD=mcoins
        restart: always
        networks:
            - development

    redis:
        image: redis:3.2-alpine
        volumes:
            - "${DOCKER_VOLUMES_PATH}/redis:/data:cached"
        ports:
            - 5379:5379
        restart: always
        networks:
            - development

networks:
    development:

and when i try to access localhost:3306 or localhost:5379 from my machine that doesn't work

this is what i get from docker ps :

docker ps command

0 Answers0