postgres:9.5
I try rebooting,
docker-compose build --no-cache
delete image and container and build again
I have many proyects and anybody starts, keeps the same configuration... Mac osx Sierra
Apparently the containers were not deleted well, I tried with this and after rebuild works ok.
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
docker-compose.yml
version: '2'
services:
web:
build: .
image: imagename
command: python manage.py runserver 0.0.0.0:8000
ports:
- "3000:3000"
- "8000:8000"
volumes:
- .:/code
depends_on:
- migration
- redis
- db
redis:
image: redis:3.2.3
db:
image: postgres:9.5
volumes:
- .:/tmp/data/
npm:
image: imagename
command: npm install
volumes:
- .:/code
migration:
image: imagename
command: python manage.py migrate --noinput
volumes:
- .:/code
depends_on:
- db
Dockerfile:
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/
RUN mkdir /code
WORKDIR /code
RUN easy_install -U pip
ADD requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt`
/tmp/data
is mounted on? (And does the user the Docker dameon is running as have perms to write to it?) – Deandredocker-compose
command from, are you in /user, /User (case matters), /projects, etc? – Sevenfold