我有 2 个 docker 镜像,每个镜像都有自己的静态 IP。如何从主机访问它们?这样大家都能ping通。
services:
first_server:
image: ubuntu:22.04
container_name: first_server
networks:
main_network:
ipv4_address: 192.168.0.197
second_server:
image: ubuntu:22.04
container_name: second_server
networks:
main_network:
ipv4_address: 192.168.0.198