Haseeb
Haseeb

Reputation: 2101

docker invalid reference format

my files strucutre . i have i am building two container one is mysql database
another is python application

docker-compose.yml


version: '3'

services:

  mysql-dev:

    image: mysql:8
    environment:
      MYSQL_ROOT_PASSWORD: *****
      MYSQL_DATABASE: vlearn

    ports:
      - "3308:3308"

  app:

    image: ./app
    ports:
      - "5000:5000"




app file

FROM python:3.7

WORKDIR /usr/src/app

COPY . .

RUN pip install pipenv
RUN pipenv install --system --deploy --ignore-pipfile


CMD ["python","app.py"]



When i Run docker-compose up i get following

Error

Pulling app (./app:)...

ERROR: invalid reference format

my directory structure

├── app
│   ├── Dockerfile
│   ├── Pipfile
│   └── Pipfile.lock
└── docker-compose.yml

Upvotes: 0

Views: 2583

Answers (1)

Haseeb
Haseeb

Reputation: 2101

 app:

    build : ./app
    ports:
      - "5000:5000"

it must be build : ./app instead of image: ./app

Upvotes: 1

Related Questions