Answer the question
In order to leave comments, you need to log in
How to create and connect docker to an existing network?
There are a dozen containers running on their own network - docker_app (this name is displayed if you run docker network ls). You cannot touch their settings in docker-compose.yaml.
It is necessary to create a new container (so far one) through a separate docker-compose.yaml + Dockerfile
For the test, I try to connect phpMyAdmin:
version: '3.4'
services:
phpmyadmin:
build: ./phpmyadmin
restart: on-failure
ports:
- 8085:80
networks:
- docker_app
networks:
docker_app:
driver: bridge
ipam:
driver: default
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question