Hello.
I have recently started to deal with docker and I have a couple of questions about its configuration and operation:
- I created a new network, so to speak
docker network create \
-o "com.docker.network.bridge.enable_icc"="true" \
-o "com.docker.network.bridge.enable_ip_masquerade"="true" \
-o "com.docker.network.bridge.host_binding_ipv4"="0.0.0.0" \
-o"com.docker.network.driver.mtu"="1500" \
lan-test --subnet 172.24.0.0/16
after that, I create a container and assign it an ip address immediately
docker run -d --name=test-container --net=lan-test --ip=172.24.0.2 images:tag
Can I make access for this container from an external LAN 192.168.1.0.24 to the ip addresses of containers 172.24.0.2-172.24.0.255 without specifying ports?
In the router of the external network, I registered a secondary network and the ip address of the gateway indicated the ip of my server. When checking the ping to the ip address 172.24.0.1, requests and responses pass, but if you ping the ip addresses of containers for example 172.24.0.2 or 172.24.0.3, etc., then the ping no longer passes
- Please tell me if it is possible to add or decrease hard disk space on a working container without losing container data:
--storage-opt size=150M
Thank you in advance for your help in exploring the docker system.
Translated using an online translator.