I am facing below mentioned error, could you please help me to resolve this?
invalid volume specification: '/run/desktop/mnt/host/d/Master/Projects/python_task/image: /app:rw': invalid mount config for type "bind": invalid mount path: ' /app' mount path must be absolute
My file structure could be seen here image
Docker-Compose:
services:
psql_crxdb:
image: postgres:13
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=dvd_rental
volumes:
- "./dvdrental_data:/var/lib/postgresql/data:rw"
ports:
- "5432:5432"
pgadmin:
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_EMAIL=admin@admin.com
- PGADMIN_DEFAULT_PASSWORD=root
ports:
- "8080:80"
analytics:
build:
context: main
environment:
POSTGRESQL_CS: 'postgresql+psycopg2://postgres:password@psql_crxdb:5432/dvd_rental'
depends_on:
- psql_crxdb
command: ["python", "./main.py" ]
pythontask:
build:
context: python_task
command: ["python", "./circle.py" ]
volumes:
- "./python_task/image: /app"
Dockerfile:
FROM python:3.9
RUN apt-get install wget
RUN pip install Pillow datetime
WORKDIR /app
COPY circle.py circle.py
ENTRYPOINT ["python", "circle.py"]