Docker-compose can’t open address

  docker, docker-compose

Trying to to start docker container locally:

Dockerfile:

FROM python:3.6

ENV PYTHONBUFFERED 1

WORKDIR /app

ADD . /app

COPY ./requirements.txt /app/requirements.txt

RUN pip3 install -r requirements.txt

docker-compose.yml

version: '3'

services:
  web:
    build: .
    command: python3 manage.py runserver 0.0.0.0:8000
    ports:
     - "9082:8000"

I have performed the next commands:

MacBook-Pro-Boss:new_oscar admin$ docker-compose build
...
Successfully built 8943fceb412c
MacBook-Pro-Boss:new_oscar admin$ docker-compose up -d
Recreating newoscar_web_1
MacBook-Pro-Boss:new_oscar admin$ docker-compose ps
   Name                   Command               State           Ports          
--------------------------------------------------------------------------------
newoscar_web_1   python3 manage.py runserve ...   Up      0.0.0.0:9082->8000/tcp 

But i cant seem to access the webpage. I have tried localhost:9082, 127.0.0.1:9082 and 192.168.0.1:9082 but all of them are down.
Any ideas on what can be wrong? Any comments would be helpful

Source: Docker Questions

LEAVE A COMMENT