I have a strange issue that I can't seem to get to the bottom of. My django project is set up using docker-compose
version: '2'
services:
db:
image: postgres:9.6.0
environment:
POSTGRES_PASSWORD: docker
POSTGRES_USER: docker
ports:
- "8001:5432"
djweb:
build: .
command: python dj/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
and dockerfile is
FROM python:3.5.2
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code/
In Pycharm I started a new Django project configured with docker compose and it was created just fine. When I try to debug it I get the usual:
warning: Debugger speedups using cython not found. Run '"/usr/local/bin/python" "/opt/.pycharm_helpers/pydev/setup_cython.py" build_ext --inplace' to build. pydev debugger: process 1 is connecting
And now the problem. I can't seem to be able to run that setup_cython command that Pycharm suggests on my 'djweb' container due to a strange read-only error. I would appreciate if anyone can point me in the right direction (I probably need to add some volume to my container or ??? - apparently pycharm also adds other images/containers alongside mine)
root@b8bf92996472:/# "/usr/local/bin/python" "/opt/.pycharm_helpers/pydev/setup_cython.py" build_ext --inplace
running build_ext building '_pydevd_bundle.pydevd_cython' extension creating build error: could not create 'build': Read-only file system