Answer the question
In order to leave comments, you need to log in
Is it possible to forward a local IP in a Docker container?
Tell me, is it possible to throw the IP of the local machine into the docker container when using docker-compose?
There are a number of projects with issued tokens that are locked on a working PC (10.1.192.155). Projects use different versions of php and mysql bundles, which is why you have to switch these versions using bash scripts.
I would like to transfer everything to docker, but I ran into the fact that when running in a container, token validation fails, as a result of which the sites become unavailable during local development.
Answer the question
In order to leave comments, you need to log in
Start containers with the key --network host
This option will set the host mode for the container's network.
But this will disable port mapping, the options -p 8080:80
will be ignored. If the container is listening on port 80, it will be port 80 of the host. Resp. it will not be possible to run several identical services at the same time in this mode.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question