1

I have a problem with docker-compose and can not create containers for service postgresql and redis, after I run docker-compose up -d I've got this error:

ERROR: for dockerizingdjango_postgres_1  Cannot create container for service postgres: b'invalid port specification: "None"'
Creating dockerizingdjango_redis_1 ... 
Creating dockerizingdjango_redis_1 ... error
ERROR: for dockerizingdjango_redis_1  Cannot create container for service redis: b'invalid port specification: "None"'
ERROR: for postgres  Cannot create container for service postgres: b'invalid port specification: "None"'
ERROR: for redis  Cannot create container for service redis: b'invalid port specification: "None"'
ERROR: Encountered errors while bringing up the project.

The docker-compose.yml file looks like this:

web:
  restart: always
  build: ./web
  expose:
    - "8000"
  links:
    - postgres:postgres
    - redis:redis
  volumes:
    - /usr/src/app
    - /usr/src/app/static
  env_file: .env
  environment:
    DEBUG: 'true'
  command: /usr/local/bin/gunicorn docker_django.wsgi:application -w 2 -b :8000

apache:
  restart: always
  build: ./apache/
  ports:
    - "80:80"
  volumes:
    - /www/static
    - /www/media
  volumes_from:
    - web
  links:
    - web:web

postgres:
  restart: always
  image: postgres:latest
  ports:
    - "5432:5432"
  volumes:
    - pgdata:/var/lib/postgresql/data/

redis:
  restart: always
  image: redis:latest
  ports:
    - "6379:6379"
  volumes:
    - redisdata:/data

I'm using this version of docker-compose:

docker-compose version 1.13.0, build 1719ceb
docker-py version: 2.3.0
CPython version: 3.4.3
OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014

also I'm using python3.5 for this container, because I'm serving django in this container, so can someone help me and explain what is going on here, and how to solve this, thanks.

2
  • 1
    Did you see this issue ? github.com/docker/compose/issues/4729 Commented Jun 8, 2017 at 6:53
  • the issue was solved with me installing docker-compose, after reading this blog post, pip installation was giving me a problem Commented Jun 8, 2017 at 7:09

1 Answer 1

1

It seems that you are hitting this issue(https://github.com/docker/compose/issues/4729). Workaround as mentioned in link is to downgrade compose or upgrade python.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.