Skip to content

Instantly share code, notes, and snippets.

@jnbek
Last active April 5, 2017 23:57
Show Gist options
  • Save jnbek/09ec4acfa62d751649559655634232b0 to your computer and use it in GitHub Desktop.
Save jnbek/09ec4acfa62d751649559655634232b0 to your computer and use it in GitHub Desktop.
My note for creating a working docker
[root@jude3 ~]# cat text_files/create_a_working_docker_containter_that_gets_Talked_to.txt
docker create -p 3000:3000 -t -i --name TestDeb debian bash
[root@jude3 ~]# cat iptables
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 3000 -j DNAT --to 172.17.0.2:3000
iptables -A FORWARD -p tcp -d 172.17.0.2 --dport 3000 -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment