Answer the question
In order to leave comments, you need to log in
How to setup network in docker?
Good day!
There is a physical server, a virtual machine is spinning in it, in which some API is running.
The API has a data.example.ru domain, it is assigned ip 10.2.0.1, which distributes the public DNS of the example.ru domain.
Now some daemons that work with this API are deployed on the physical server in the docker.
Deployed via docker-compose, something like this configuration:
version: '3.7'
services:
data-whatever:
command: ["traceroute", "data.example.ru"]
networks:
- default
volumes:
- /srv/dev:/service
build:
context: .
dockerfile: /srv/Dockerfile
networks:
default:
driver: bridge
ipam:
config:
- subnet: 10.10.0.0/20
data-whatever_1 | traceroute to data.example.ru (10.2.0.1), 30 hops max, 60 byte packets
data-whatever_1 | 1 10.10.0.1 (10.10.0.1) 0.076 ms 0.033 ms 0.027 ms
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