title: Docker FATAL: could not write lock file "postmaster.pid": No space left on device
body: <p><code>postgres:9.5</code></p>
  
  <p>I try rebooting, </p>
  
  <pre><code>docker-compose build --no-cache
  </code></pre>
  
  <p>delete image and container and build again</p>
  
  <p>I have many proyects and anybody starts, keeps the same configuration...
  Mac osx Sierra</p>
  
  <p><a href="https://i.stack.imgur.com/YhsB0.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/YhsB0.jpg" alt="docker version"></a></p>
  
  <p><a href="https://i.stack.imgur.com/GRVKK.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/GRVKK.jpg" alt="see the error"></a></p>
  
  <hr>
  
  <p>Apparently the containers were not deleted well, I tried with this and after rebuild works ok.</p>
  
  <pre><code># Delete all containers
  docker rm $(docker ps -a -q)
  # Delete all images
  docker rmi $(docker images -q)
  </code></pre>
  
  <hr>
  
  <p>docker-compose.yml</p>
  
  <pre class="lang-yaml prettyprint-override"><code>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
  </code></pre>
  
  <p>Dockerfile:</p>
  
  <pre class="lang-none prettyprint-override"><code>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`
  </code></pre>