Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker FATAL: could not write lock file "postmaster.pid": No space left on device

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

docker version

see the error


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`
like image 308
Ivan Camilito Ramirez Verdes Avatar asked Apr 11 '17 19:04

Ivan Camilito Ramirez Verdes


2 Answers

If you do not have any critical data you can blow away the docker volume.

docker volume ls

docker volume rm your_volume

like image 155
Jbur43 Avatar answered Sep 18 '22 22:09

Jbur43


If you're coming here from Google and finding that multiple containers are complaining of Disk space, the issue may be that your local Docker installation has maxed out its disk image size. This is configurable in Docker for Mac. Here are the instructions to change that disk image size.

like image 39
Gowiem Avatar answered Sep 17 '22 22:09

Gowiem