команда_запуска_tor >/dev/null 2>&1 &
команда_запуска_моего_приложения
cap_add:
- NET_ADMIN
ip route replace default via IP_другого_контейнера
ip route add default via `dig +short router`
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -s 172.18.0.0/24 -j MASQUERADE
network=$(ip route list|grep scope\ link|cut -d ' ' -f 1)
shurik@ubuntu ~/dockers/test2 $ docker build -t pythontest .
Sending build context to Docker daemon 3.072kB
Step 1/5 : FROM python:3.6
---> 2dfb6d103623
Step 2/5 : RUN mkdir -p /usr/src/app/
---> Running in 09f00e2cd7c0
---> f7bf180ffc62
Removing intermediate container 09f00e2cd7c0
Step 3/5 : WORKDIR /usr/src/app/
---> a35eb6c2b4d2
Removing intermediate container 28981d13a074
Step 4/5 : COPY . /usr/src/app/
---> bf2cafb07143
Removing intermediate container 0553c72905cb
Step 5/5 : CMD python app.py
---> Running in 0e57967e6d8f
---> 5157a21343e9
Removing intermediate container 0e57967e6d8f
Successfully built 5157a21343e9
Successfully tagged pythontest:latest
shurik@ubuntu ~/dockers/test2 $ docker run -it --rm pythontest
hello world
shurik@ubuntu ~/dockers/test2 $