0

I have a basic docker-compose.yml:

version: '2'
services:
  hvac_backend:
    build: ./HVAC_backend
    ports:
      - 8000:5000
  hvac_frontend:
    build: ./HVAC_frontend
    ports:
      - 80:80

and the two following Dockerfiles being HVAC_frontend:

FROM nginx:1.17.8

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

and HVAC_backend:

FROM balenalib/beaglebone-black-alpine-python:3-3.11

MAINTAINER Muller

WORKDIR /usr/src/app

COPY . ./

RUN pip install -r requirements.txt

ENTRYPOINT ["python"]

CMD ["app.py"]

When I run a normal docker build and docker run on the the HVAC_frontend nginx runs fine on localhost:80. When I do a docker-compose up -d I get a output of:

Creating hvac_balenaos_hvac_backend_1  ... done
Creating hvac_balenaos_hvac_frontend_1 ... done

but after a docker ps only the HVAC_backend is running

CONTAINER ID        IMAGE                        COMMAND             CREATED             STATUS              PORTS                    NAMES
249be0be515a        hvac_balenaos_hvac_backend   "python app.py"     10 seconds ago      Up 9 seconds        0.0.0.0:8000->5000/tcp   hvac_balenaos_hvac_backend_1

Any clues? Feels like I'm just missing something small. What happened to HVAC_frontend?

1
  • One of your containers failed to come up - check the logs, eg docker logs hvac_balenaos_hvac_frontend_1. Commented Feb 19, 2020 at 10:29

1 Answer 1

1

Probably your backend container starts properly but stops because of some exception.

run this command:

docker ps -a

to list all containers even this which are stopped.

enter image description here

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

2 Comments

Thanks, this helped. I have a hvac_frontend_1 | standard_init_linux.go:211: exec user process caused "no such file or directory"
Here you have also helpful instruction on how to go inside the container from the command line: stackoverflow.com/a/30173220/2275775

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.