This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docker [2018/07/24 14:46] k2patel created |
docker [2020/08/10 02:35] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Docker ====== | ====== Docker ====== | ||
+ | |||
+ | ==== Attach / Dettach ==== | ||
+ | |||
+ | <code bash> | ||
+ | docker attach <id|name> | ||
+ | </code> | ||
+ | |||
+ | == Prevent termination while <Ctrl> + C in term == | ||
+ | by changing sig proxy it can be prevented. | ||
+ | <code bash> | ||
+ | docker attach --sig-proxy=false <id|name> | ||
+ | </code> | ||
+ | |||
+ | |||
+ | ==== Host Firewall ==== | ||
Setting up firewall port forwarding and exposing service to world or specific IP. | Setting up firewall port forwarding and exposing service to world or specific IP. | ||
<code bash> | <code bash> | ||
+ | # Forwarding port traffic | ||
firewall-cmd --permanent --zone=public --add-forward-port=port=3030:proto=tcp:toport=3030 | firewall-cmd --permanent --zone=public --add-forward-port=port=3030:proto=tcp:toport=3030 | ||
+ | # Allowing access from specific host | ||
firewall-cmd --permanent --zone=public --add-rich-rule="rule | firewall-cmd --permanent --zone=public --add-rich-rule="rule | ||
family="ipv4" \ | family="ipv4" \ |