I am following the docker/django tutorial: https://docs.docker.com/compose/django/
I set up a project directory C:\docker_test and configured docker-compose.yml, Dockerfile and requirements.txt as described in the guide.
This is the contents of docker-compose.yml:
version: '3'
services:
db:
image: postgres
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
And the contents of the Dockerfile:
FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
COPY requirements.txt /code/
RUN pip --proxy=http://mycorpproxy:80 install -r requirements.txt
COPY . /code/
When I run docker-compose run web django-admin startproject composeexample .
it executes as expected but I do not see a composeexample directory created. If I attempt to re-run the command I get this error:
CommandError: /code/manage.py already exists, overlaying a project or app into an existing directory won't replace conflicting files
I don't have a /code/ directory on my local machine... where is it located?
Thanks!
EDIT: This does not feel like much of an answer but here is how I got this working again. I uninstalled docker and re-installed. Our Sec dept keeps a pretty tight grip on the host FW rules so I had to get a helpdesk person to adjust some firewall rules on my host and we got it working. I had to do the same last time I installed docker but something seems to have gone right this time. In a case like this it would be nice if there was a way to not use a network share for drive access.