Answer the question
In order to leave comments, you need to log in
How to run docker containers correctly?
Good afternoon. Never used docker.
Actually, the question is as follows:
For example, in this container - https://hub.docker.com/r/hwdsl2/ipsec-vpn-server/
The following command is specified to start the container:
docker run \
--name ipsec-vpn-server \
--env-file ./vpn.env \
-p 500:500/udp \
-p 4500:4500/udp \
-v /lib/modules:/lib/modules:ro \
-d --privileged \
hwdsl2/ipsec-vpn-server
Answer the question
In order to leave comments, you need to log in
This is done just for convenience, because. in nix, a backslash allows you to break a single-line command into several lines, which in this case increases readability
. Same command:
docker run --name ipsec-vpn-server --env-file ./vpn.env -p 500:500/udp - p 4500:4500/udp -v /lib/modules:/lib/modules:ro -d --privileged hwdsl2/ipsec-vpn-server
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question