Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Unable to access docker container from browser

I wrote a ChatOps bot for the open source collaboration tool Mattermost using this framework. Now I want to write some integration tests and run them. When I follow the steps to run the integration tests from their project, they won’t succeed. I used the command pytest --capture=no --log-cli-level=DEBUG . to run the integration tests.

It fails because localhost:8065 is not available yet after running the command docker-compose up -d. Anybody knows what I’m doing wrong?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Are you on Linux, Mac, or Windows? I think network_mode: host only works on Linux.

Try to edit the docker-compose.yml file, remove the network mode "host", and add a port mapping, something like this:

version: "3.7"

services:
  app:
    container_name: "mattermost-bot-test"
    build: .
    command: ./mm/docker-entry.sh
    ports:
      - "8065:8065"
    extra_hosts:
      - "dockerhost:127.0.0.1"
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading