Skip to content

Tips and Trics

  • Filter out just container name
    Bash
    docker ps | awk '{print $NF}' | grep -w somename
    
  • How to run more complex commands | docker exec
    Bash
    docker exec -i container_name bash -c "cd /root/python && python myscript.py"
    
  • List containers by name
    Bash
    docker ps --format '{{.Names}}'
    

Other Stuff

  • Run OpenVPN client
Bash
docker run -it --cap-add=NET_ADMIN --device /dev/net/tun --name vpn -v /home/$USER/temp/vpnclient-openvpn/profile-8.ovpn:/vpn/profile-8.ovpn -d dperson/openvpn-client
Back to top