Trying to docker-compose up but mysql build failed

Viewed 22

I tried to "docker-compose up" my project with docker cli and it came out error like this mysql failed to build

And my docker-compose.yml like this

    version: '3'

services:
  mysql:
    image: mysql:latest
    container_name: mysql
    build: ./mysql
    volumes:
      - ${DATA_SAVE_PATH}/mysql:/var/lib/mysql
    cap_add:
      - SYS_NICE
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
    ports:
      - "3306:3306"
    restart: always
    command: --default-authentication-plugin=mysql_native_password

  redis:
    image: redis:latest
    container_name: redis
    build: ./redis
    volumes:
      - ${DATA_SAVE_PATH}/redis:/data
    ports:
      - "6379:6379"
    restart: always

My .env like this

DATA_SAVE_PATH=

MYSQL_ROOT_PASSWORD=root
MYSQL_PORT=3306

REDIS_PORT=6379
1 Answers

The error is enter image description here

Your docker daemon is not able to access docker registry.

Check your internet/firewall settings and if you need a proxy.

Related