Docker Community Forums

Share and learn in the Docker community.

My development Diango project in shared folder on T drive. How to set up volume in docker-compose.yml? thanks

My django project is located at:
T:\development\MRFRasterWebUploader

When I use this setting in my docker-compose.yml

version: ‘3’

services:
web:
build: .
network_mode: “host”
command: bash -c “python manage.py runserver 0.0.0.0:7009”
container_name: MRFRasterWebUploader
volumes:
- .:/MRFRasterWebUploader
ports:
- “7009:7009”

it reported the error:
ERROR: for web Cannot create container for service web: invalid volume specification: ‘T:\development\MRFRasterWebUploader’

Hi

try and change:

  • .:/MRFRasterWebUploader

with:

  • ${PWD}:/MRFRasterWebUploader