__NUXT_JSONP__("/en/tutorials/ubuntu-docker-install-with-compose-and-portainer", (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu){return {data:[{tutorial:{slug:"ubuntu-docker-install-with-compose-and-portainer",description:"Learn how to set up Docker CE on Ubuntu 20.04 with docker-compose and Portainer for better management. Includes ufw configuration instructions for additional security.",github_file_url:"https:\u002F\u002Fgithub.com\u002Fnetcup-community\u002Fcommunity-tutorials\u002Fblob\u002Fmain\u002Fcommunity-tutorials\u002Fubuntu-docker-install\u002F01-en.md",title:"Installing Docker CE on Ubuntu 20.04 with docker-compose, Portainer and ufw",updated_at:"04\u002F11\u002F2021",author_name:"Marcel Aust",author_url:"https:\u002F\u002Fgithub.com\u002FMarcel2508",author_image:"default-author",author_bio:M,tags:["shell",G,"ubuntu","portainer",V,af],netcup_product_url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fserver\u002Froot-server\u002Frs-2000-g9.5-a1-iv",language:ag,available_languages:ag,toc:[{id:ah,depth:x,text:ai},{id:aj,depth:x,text:ak},{id:al,depth:x,text:am},{id:an,depth:x,text:ao},{id:ap,depth:E,text:aq},{id:ar,depth:E,text:as},{id:at,depth:E,text:au},{id:av,depth:x,text:aw},{id:ax,depth:E,text:ay},{id:az,depth:E,text:aA},{id:aB,depth:E,text:aC},{id:aD,depth:E,text:aE},{id:aF,depth:x,text:aG},{id:aH,depth:x,text:aI},{id:aJ,depth:x,text:aK},{id:aL,depth:x,text:aM},{id:aN,depth:x,text:aO},{id:aP,depth:x,text:aQ}],body:{type:aR,children:[{type:b,tag:y,props:{id:ah},children:[{type:b,tag:o,props:{href:"#introduction",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:ai}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"This tutorial explains how to install Docker CE on Ubuntu 20.04.\nWith this tutorial, you will learn how to install and configure Docker on Ubuntu to use it with many different apps and services.\nAlso, this tutorial describes how to use Docker with "},{type:b,tag:B,props:{},children:[{type:a,value:af}]},{type:a,value:" and additionally install and set up "},{type:b,tag:B,props:{},children:[{type:a,value:V}]},{type:a,value:" and "},{type:b,tag:B,props:{},children:[{type:a,value:"Portainer"}]},{type:a,value:".\nYou should have a basic understanding of Linux and shell commands. A fresh install of Ubuntu 20.04 (may also work with other versions) is required."}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"This tutorial is based on the "},{type:b,tag:o,props:{href:"https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Finstall\u002Fubuntu\u002F",rel:[H,I,J],target:K},children:[{type:a,value:"official tutorial provided by docker"}]},{type:a,value:" with a few extra notes and additions."}]},{type:a,value:d},{type:b,tag:y,props:{id:aj},children:[{type:b,tag:o,props:{href:"#requirements",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:ak}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"Docker can be used on nearly any root or vServer. netcup's server architecture is amd64. You need to be "},{type:b,tag:h,props:{},children:[{type:a,value:aR}]},{type:a,value:" and\u002For have "},{type:b,tag:h,props:{},children:[{type:a,value:q}]},{type:a,value:" privileges to install packages."}]},{type:a,value:d},{type:b,tag:y,props:{id:al},children:[{type:b,tag:o,props:{href:"#step-1---preparation",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:am}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"We will install Docker by using Ubuntu's APT package manager. To fetch the latest package database, use:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:N}]},{type:a,value:aS}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To add a custom package repository for Docker, we need a few apt tools that you may not have installed yet. Use the following command to install them:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:N}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:W}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,z]},children:[{type:a,value:A}]},{type:a,value:"\n    ca-certificates "},{type:b,tag:c,props:{className:[e,z]},children:[{type:a,value:A}]},{type:a,value:O},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:X}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,z]},children:[{type:a,value:A}]},{type:a,value:"\n    gnupg "},{type:b,tag:c,props:{className:[e,z]},children:[{type:a,value:A}]},{type:a,value:"\n    lsb-release\n"}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"If there are multiple packages or dependencies to be installed, the installer might ask for your confirmation. Press "},{type:b,tag:h,props:{},children:[{type:a,value:"y"}]},{type:a,value:" and ENTER when asked:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,P]},children:[{type:b,tag:h,props:{},children:[{type:a,value:"The following NEW packages will be installed:\n  ....\n0 upgraded, 64 newly installed, 0 to remove and 0 not upgraded.\nNeed to get 13.5 MB of archives.\nAfter this operation, 51.6 MB of additional disk space will be used.\nDo you want to continue? [Y\u002Fn] y\n"}]}]}]},{type:a,value:d},{type:b,tag:y,props:{id:an},children:[{type:b,tag:o,props:{href:"#step-2---add-custom-repository-and-install-docker",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:ao}]},{type:a,value:d},{type:b,tag:F,props:{id:ap},children:[{type:b,tag:o,props:{href:"#step-21---add-custom-apt-repository",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:aq}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"Docker gets shipped by a custom apt package repository hosted by the Docker organization. This provides newer and more frequently updated versions of docker-ce."}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"At first you need to add Docker's PGP key. To do this, execute the following command:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:X}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"-fsSL"}]},{type:a,value:" https:\u002F\u002Fdownload.docker.com\u002Flinux\u002Fubuntu\u002Fgpg "},{type:b,tag:c,props:{className:[e,D]},children:[{type:a,value:aT}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:" gpg "},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"--dearmor"}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:aU}]},{type:a,value:" \u002Fusr\u002Fshare\u002Fkeyrings\u002Fdocker-archive-keyring.gpg\n"}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"After adding the key file, we need to add the new repository. To do this, type:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,Y,Z]},children:[{type:a,value:"echo"}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,z]},children:[{type:a,value:A}]},{type:a,value:"\n  "},{type:b,tag:c,props:{className:[e,aV]},children:[{type:a,value:"\"deb [arch="},{type:b,tag:c,props:{className:[e,j]},children:[{type:b,tag:c,props:{className:[e,j]},children:[{type:a,value:Q}]},{type:a,value:"dpkg --print-architecture"},{type:b,tag:c,props:{className:[e,j]},children:[{type:a,value:R}]}]},{type:a,value:" signed-by=\u002Fusr\u002Fshare\u002Fkeyrings\u002Fdocker-archive-keyring.gpg] https:\u002F\u002Fdownload.docker.com\u002Flinux\u002Fubuntu \\\n  "},{type:b,tag:c,props:{className:[e,j]},children:[{type:b,tag:c,props:{className:[e,j]},children:[{type:a,value:Q}]},{type:a,value:"lsb_release "},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"-cs"}]},{type:b,tag:c,props:{className:[e,j]},children:[{type:a,value:R}]}]},{type:a,value:" stable\""}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,D]},children:[{type:a,value:aT}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:"tee"}]},{type:a,value:" \u002Fetc\u002Fapt\u002Fsources.list.d\u002Fdocker.list "},{type:b,tag:c,props:{className:[e,D]},children:[{type:a,value:_}]},{type:a,value:" \u002Fdev\u002Fnull\n"}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To fetch all available packages from the newly added repository, run the following command again:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:N}]},{type:a,value:aS}]}]}]},{type:a,value:d},{type:b,tag:F,props:{id:ar},children:[{type:b,tag:o,props:{href:"#step-22---install-docker",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:as}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To finally install the Docker package, run:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:N}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:W}]},{type:a,value:" docker-ce docker-ce-cli containerd.io\n"}]}]}]},{type:a,value:d},{type:b,tag:F,props:{id:at},children:[{type:b,tag:o,props:{href:"#step-23---test-if-docker-is-working",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:au}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To test if Docker is working, you can fetch the \"hello world\" image and start it by using:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,P]},children:[{type:b,tag:h,props:{},children:[{type:a,value:"sudo docker run --rm hello-world\n"}]}]}]},{type:a,value:d},{type:b,tag:y,props:{id:av},children:[{type:b,tag:o,props:{href:"#step-3---set-up-ufw-so-docker-doesnt-bypass-firewall-rules-optional",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:aw}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"If you're using ufw as an iptables frontend\u002Ffirewall for your server, you should be cautious with Docker's iptables modifications, as Docker will bypass the rules defined with ufw. To fix this, we have to modify a specific ufw config file. This part is based on the "},{type:b,tag:o,props:{href:aW,rel:[H,I,J],target:K},children:[{type:a,value:"ufw-docker Github repository"}]},{type:a,value:" tutorial."}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To check if your server is using ufw, run the following command:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:" ufw status\n"}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"Check if the reported status is "},{type:b,tag:h,props:{},children:[{type:a,value:"active"}]},{type:a,value:".\nThe expected result should be similar to this:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,P]},children:[{type:b,tag:h,props:{},children:[{type:a,value:"Status: active\n\nTo                         Action      From\n--                         ------      ----\n...                         ...         ...\n"}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"If your server shows an \"inactive\" state, ufw is not enabled for your server. If you want to enable it, see "},{type:b,tag:B,props:{},children:[{type:a,value:"Step 3.1"}]}]},{type:a,value:d},{type:b,tag:F,props:{id:ax},children:[{type:b,tag:o,props:{href:"#step-31---enable-ufw-optional",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:ay}]},{type:a,value:d},{type:b,tag:S,props:{},children:[{type:a,value:d},{type:b,tag:f,props:{},children:[{type:b,tag:B,props:{},children:[{type:a,value:"Important:"}]},{type:a,value:" When enabling ufw and not adding a rule for SSH, you might lose connectivity to your server. Make sure to add an appropriate rule for allowing SSH traffic on port "},{type:b,tag:h,props:{},children:[{type:a,value:"22"}]},{type:a,value:" by using the following command:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:" ufw allow "},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:"ssh"}]},{type:a,value:d}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"You can also add this rule by using netcup's web console feature found inside your server control panel."}]},{type:a,value:d}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To enable ufw in case it's not yet enabled, you can run:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:" ufw "},{type:b,tag:c,props:{className:[e,Y,Z]},children:[{type:a,value:"enable"}]},{type:a,value:d}]}]}]},{type:a,value:d},{type:b,tag:F,props:{id:az},children:[{type:b,tag:o,props:{href:"#step-32---set-up-ufw-config",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:aA}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"Use an editor of your choice to edit the configuration file at "},{type:b,tag:h,props:{},children:[{type:a,value:"\u002Fetc\u002Fufw\u002Fafter.rules"}]},{type:a,value:" (e.g. "},{type:b,tag:h,props:{},children:[{type:a,value:"sudo nano \u002Fetc\u002Fufw\u002Fafter.rules"}]},{type:a,value:").\nAdd the following to the end of the file and save it:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,P]},children:[{type:b,tag:h,props:{},children:[{type:a,value:"## BEGIN UFW AND DOCKER\n*filter\n:ufw-user-forward - [0:0]\n:ufw-docker-logging-deny - [0:0]\n:DOCKER-USER - [0:0]\n-A DOCKER-USER -j ufw-user-forward\n\n-A DOCKER-USER -j RETURN -s 10.0.0.0\u002F8\n-A DOCKER-USER -j RETURN -s 172.16.0.0\u002F12\n-A DOCKER-USER -j RETURN -s 192.168.0.0\u002F16\n\n-A DOCKER-USER -p udp -m udp --sport 53 --dport 1024:65535 -j RETURN\n\n-A DOCKER-USER -j ufw-docker-logging-deny -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -d 192.168.0.0\u002F16\n-A DOCKER-USER -j ufw-docker-logging-deny -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -d 10.0.0.0\u002F8\n-A DOCKER-USER -j ufw-docker-logging-deny -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -d 172.16.0.0\u002F12\n-A DOCKER-USER -j ufw-docker-logging-deny -p udp -m udp --dport 0:32767 -d 192.168.0.0\u002F16\n-A DOCKER-USER -j ufw-docker-logging-deny -p udp -m udp --dport 0:32767 -d 10.0.0.0\u002F8\n-A DOCKER-USER -j ufw-docker-logging-deny -p udp -m udp --dport 0:32767 -d 172.16.0.0\u002F12\n\n-A DOCKER-USER -j RETURN\n\n-A ufw-docker-logging-deny -m limit --limit 3\u002Fmin --limit-burst 10 -j LOG --log-prefix \"[UFW DOCKER BLOCK] \"\n-A ufw-docker-logging-deny -j DROP\n\nCOMMIT\n## END UFW AND DOCKER\n"}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"After saving the modifications, restart the server to have the changes take effect."}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:"reboot"}]},{type:a,value:d}]}]}]},{type:a,value:d},{type:b,tag:F,props:{id:aB},children:[{type:b,tag:o,props:{href:"#step-33---using-ufw-to-open-ports",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:aC}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"If you want to publish a port from your containers, use the following command:"}]},{type:a,value:d},{type:b,tag:S,props:{},children:[{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"This command publishes port 80 from any container's local port. Replace 80 with your custom ports for TCP communication. To use the UDP Protocol, replace "},{type:b,tag:h,props:{},children:[{type:a,value:"proto tcp"}]},{type:a,value:" with "},{type:b,tag:h,props:{},children:[{type:a,value:"proto udp"}]},{type:a,value:T}]},{type:a,value:d}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:a,value:"ufw route allow proto tcp from any to any port "},{type:b,tag:c,props:{className:[e,L]},children:[{type:a,value:aX}]},{type:a,value:d}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"If you have multiple containers using the same port, you can specify the container by its private (internal) IP:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:a,value:"ufw route allow proto tcp from any to "},{type:b,tag:c,props:{className:[e,L]},children:[{type:a,value:"172.17"}]},{type:a,value:".0.2 port "},{type:b,tag:c,props:{className:[e,L]},children:[{type:a,value:aX}]},{type:a,value:d}]}]}]},{type:a,value:d},{type:b,tag:S,props:{},children:[{type:a,value:d},{type:b,tag:f,props:{},children:[{type:b,tag:B,props:{},children:[{type:a,value:"Please note:"}]},{type:a,value:" The port used at the end of this command is the "},{type:b,tag:B,props:{},children:[{type:a,value:"internal"}]},{type:a,value:" port of the container! You don't have to expose it to the host."}]},{type:a,value:d}]},{type:a,value:d},{type:b,tag:F,props:{id:aD},children:[{type:b,tag:o,props:{href:"#step-34---using-the-ufw-docker-tool-for-easier-setup",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:aE}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"Instead of performing the above manual steps to install\u002Fconfigure ufw, you can use a handy script provided by the authors of the "},{type:b,tag:o,props:{href:aW,rel:[H,I,J],target:K},children:[{type:a,value:"ufw-docker repository"}]},{type:a,value:T}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To install the tool, run the following command:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:"wget"}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"-O"}]},{type:a,value:" \u002Fusr\u002Flocal\u002Fbin\u002Fufw-docker "},{type:b,tag:c,props:{className:[e,z]},children:[{type:a,value:A}]},{type:a,value:"\n  https:\u002F\u002Fgithub.com\u002Fchaifeng\u002Fufw-docker\u002Fraw\u002Fmaster\u002Fufw-docker\n"},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:aY}]},{type:a,value:" +x \u002Fusr\u002Flocal\u002Fbin\u002Fufw-docker\n"}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To automatically apply the ufw "},{type:b,tag:h,props:{},children:[{type:a,value:"after.rules"}]},{type:a,value:" change, run:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:aZ},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:W}]},{type:a,value:d}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To publish a container port, use the command:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:" ufw-docker allow "},{type:b,tag:c,props:{className:[e,D]},children:[{type:a,value:a_}]},{type:a,value:"CONTAINER_NAME"},{type:b,tag:c,props:{className:[e,D]},children:[{type:a,value:_}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,D]},children:[{type:a,value:a_}]},{type:a,value:"PORT"},{type:b,tag:c,props:{className:[e,D]},children:[{type:a,value:_}]},{type:a,value:d}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To display further information and help, use the command:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:aZ},{type:b,tag:c,props:{className:[e,Y,Z]},children:[{type:a,value:"help"}]},{type:a,value:d}]}]}]},{type:a,value:d},{type:b,tag:y,props:{id:aF},children:[{type:b,tag:o,props:{href:"#step-4---add-your-user-to-docker-group-to-use-docker-without-sudo-optional",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:aG}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"If you wish to use Docker with your regular user without using "},{type:b,tag:h,props:{},children:[{type:a,value:q}]},{type:a,value:" all the time, you can add your user to the \"docker\" group.\n"},{type:b,tag:B,props:{},children:[{type:a,value:"Please bear in mind that other users might exploit Docker to gain root access to your host machine!"}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To add your user to the \"docker\" group, run:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,a$]},children:[{type:a,value:"## Create the docker group in case it does not yet exist"}]},{type:a,value:d},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:"groupadd"}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:G}]},{type:a,value:d},{type:b,tag:c,props:{className:[e,a$]},children:[{type:a,value:"## Add your user to the docker group"}]},{type:a,value:d},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:"usermod"}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"-aG"}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:G}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,"environment","constant"]},children:[{type:a,value:"$USER"}]},{type:a,value:d}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"You need to log out and log back in to have the changes take effect."}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"To test if this step was successful, you can run the following command again without sudo:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:G}]},{type:a,value:ba},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"--rm"}]},{type:a,value:" hello-world\n"}]}]}]},{type:a,value:d},{type:b,tag:y,props:{id:aH},children:[{type:b,tag:o,props:{href:"#step-5---install-docker-compose-optional",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:aI}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"When using apps\u002Fservices that depend on multiple containers\u002Fimages you can use "},{type:b,tag:h,props:{},children:[{type:a,value:V}]},{type:a,value:" for easier setup\u002Fmaintenance. This part is based on the "},{type:b,tag:o,props:{href:"https:\u002F\u002Fdocs.docker.com\u002Fcompose\u002Finstall\u002F",rel:[H,I,J],target:K},children:[{type:a,value:"official documentation for docker-compose"}]},{type:a,value:".\nTo install docker-compose, run the following commands:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:X}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"-L"}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,aV]},children:[{type:a,value:"\"https:\u002F\u002Fgithub.com\u002Fdocker\u002Fcompose\u002Freleases\u002Fdownload\u002F1.29.2\u002Fdocker-compose-"},{type:b,tag:c,props:{className:[e,j]},children:[{type:b,tag:c,props:{className:[e,j]},children:[{type:a,value:Q}]},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:bb}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"-s"}]},{type:b,tag:c,props:{className:[e,j]},children:[{type:a,value:R}]}]},{type:a,value:"-"},{type:b,tag:c,props:{className:[e,j]},children:[{type:b,tag:c,props:{className:[e,j]},children:[{type:a,value:Q}]},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:bb}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"-m"}]},{type:b,tag:c,props:{className:[e,j]},children:[{type:a,value:R}]}]},{type:a,value:"\""}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:aU}]},{type:a,value:" \u002Fusr\u002Flocal\u002Fbin\u002Fdocker-compose\n"},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:aY}]},{type:a,value:" +x \u002Fusr\u002Flocal\u002Fbin\u002Fdocker-compose\n"}]}]}]},{type:a,value:d},{type:b,tag:y,props:{id:aJ},children:[{type:b,tag:o,props:{href:"#step-6---install-portainer-optional",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:aK}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"Portainer is a software for managing Docker containers with a handy web UI.\nAdditional information can be found in the "},{type:b,tag:o,props:{href:"https:\u002F\u002Fdocs.portainer.io\u002Fv\u002Fce-2.9\u002Fstart\u002Finstall\u002Fserver\u002Fdocker\u002Flinux",rel:[H,I,J],target:K},children:[{type:a,value:"official documentation"}]},{type:a,value:T}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"Portainer itself gets shipped as a Docker image. To install it, simply create a new volume and run the container."}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:G}]},{type:a,value:" volume create portainer_data\n"},{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:G}]},{type:a,value:ba},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"-d"}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"-p"}]},{type:a,value:i},{type:b,tag:c,props:{className:[e,L]},children:[{type:a,value:bc}]},{type:a,value:":9443 "},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"--name"}]},{type:a,value:" portainer "},{type:b,tag:c,props:{className:[e,z]},children:[{type:a,value:A}]},{type:a,value:O},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:"--restart"}]},{type:b,tag:c,props:{className:[e,D]},children:[{type:a,value:"="}]},{type:a,value:"always "},{type:b,tag:c,props:{className:[e,z]},children:[{type:a,value:A}]},{type:a,value:O},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:bd}]},{type:a,value:" \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock "},{type:b,tag:c,props:{className:[e,z]},children:[{type:a,value:A}]},{type:a,value:O},{type:b,tag:c,props:{className:[e,w,j]},children:[{type:a,value:bd}]},{type:a,value:" portainer_data:\u002Fdata "},{type:b,tag:c,props:{className:[e,z]},children:[{type:a,value:A}]},{type:a,value:"\n    portainer\u002Fportainer-ce:latest\n"}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"If you use the ufw modification, you need to add port 9443 to make it reachable:"}]},{type:a,value:d},{type:b,tag:k,props:{className:[l]},children:[{type:b,tag:m,props:{className:[n,r]},children:[{type:b,tag:h,props:{},children:[{type:b,tag:c,props:{className:[e,g]},children:[{type:a,value:q}]},{type:a,value:" ufw-docker allow portainer "},{type:b,tag:c,props:{className:[e,L]},children:[{type:a,value:bc}]},{type:a,value:d}]}]}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"You can now reach Portainer via your web browser by opening URL: "},{type:b,tag:h,props:{},children:[{type:a,value:"https:\u002F\u002F\u003CYOURSERVER\u003E:9443"}]},{type:a,value:T}]},{type:a,value:d},{type:b,tag:S,props:{},children:[{type:a,value:d},{type:b,tag:f,props:{},children:[{type:b,tag:B,props:{},children:[{type:a,value:"Note:"}]},{type:a,value:" By default, Portainer is using a self-signed certificate. Therefore, a warning may appear when you open the web panel for the first time."}]},{type:a,value:d}]},{type:a,value:d},{type:b,tag:y,props:{id:aL},children:[{type:b,tag:o,props:{href:"#conclusion",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:aM}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"Installing Docker is just the base for many different applications and use cases. For example, you can install \"mailcow-dockerized\" or other software that uses it.\nBy using nginx as a reverse proxy inside Docker or on your host machine, you can have multiple webservices listen on the same port with different domain names\u002Fpaths."}]},{type:a,value:d},{type:b,tag:y,props:{id:aN},children:[{type:b,tag:o,props:{href:"#license",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:aO}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicence, and\u002For sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:"}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"The above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software."}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."}]},{type:a,value:d},{type:b,tag:y,props:{id:aP},children:[{type:b,tag:o,props:{href:"#contributors-certificate-of-origin",ariaHidden:s,tabIndex:t},children:[{type:b,tag:c,props:{className:[u,v]},children:[]}]},{type:a,value:aQ}]},{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"By making a contribution to this project, I certify that:"}]},{type:a,value:d},{type:b,tag:"ol",props:{},children:[{type:a,value:d},{type:b,tag:U,props:{},children:[{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"The contribution was created in whole or in part by me and I have the right to submit it under the license indicated in the file; or"}]},{type:a,value:d}]},{type:a,value:d},{type:b,tag:U,props:{},children:[{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same license (unless I am permitted to submit under a different license), as indicated in the file; or"}]},{type:a,value:d}]},{type:a,value:d},{type:b,tag:U,props:{},children:[{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it."}]},{type:a,value:d}]},{type:a,value:d},{type:b,tag:U,props:{},children:[{type:a,value:d},{type:b,tag:f,props:{},children:[{type:a,value:"I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the license(s) involved."}]},{type:a,value:d}]},{type:a,value:d}]}]},dir:"\u002Ftutorials\u002Fubuntu-docker-install-with-compose-and-portainer",path:"\u002Ftutorials\u002Fubuntu-docker-install-with-compose-and-portainer\u002F01-en",extension:".md",createdAt:"2024-10-25T09:15:17.628Z",updatedAt:"2024-10-25T09:14:14.000Z"},categoryCard:{id:1,title:be,subtitle:"With a 99.9% minimum availability guarantee",priceInfo:"monthly from",price:9.81,slug:"rootserver",link:{id:216,text:$,newWindow:p,url:bf},image:{data:{id:19,attributes:{name:aa,alternativeText:aa,caption:aa,width:bg,height:208,formats:{},hash:"illu_v_Server_ohne_Schatten_a9e95838d1",ext:".svg",mime:"image\u002Fsvg+xml",size:3.63,url:"\u002Fuploads\u002Fillu_v_Server_ohne_Schatten_a9e95838d1.svg",previewUrl:M,provider:"local",provider_metadata:M,createdAt:"2022-05-10T09:22:14.246Z",updatedAt:"2022-06-29T10:42:10.152Z"}}}},usedProduct:{name:ab,imgUrl:"https:\u002F\u002Fwww.netcup.de\u002Fstatic\u002Fassets\u002Fimages\u002Fprodukt_Illus\u002Fmit_Schatten\u002Fundefined",imgAlt:ab,price:ab,url:"https:\u002F\u002Fwww.netcup.eu\u002Fbestellen\u002Fprodukt.php?produkt=undefined",available:C}}],fetch:{"MobileMenuSTvue_type_script_lang_ts_default_1:0":{menuItems:[{id:bh,text:ac,newWindow:p,url:bi},{id:bj,text:ad,newWindow:C,url:bk},{id:bl,text:bm,newWindow:C,url:bn},{id:bo,text:ae,newWindow:C,url:bp}],menuVisible:C},"LanguageSwitcherMobile:0":{link:bq},"DesktopMenuSTvue_type_script_lang_ts_default_1:0":{menuItems:[{id:bh,text:ac,newWindow:p,url:bi},{id:bj,text:ad,newWindow:C,url:bk},{id:bl,text:bm,newWindow:C,url:bn},{id:bo,text:ae,newWindow:C,url:bp}]},"LanguageSwitcher:0":{link:bq},"SubmitTutorialST:0":{title:br,text:bs,link:{id:bt,text:$,newWindow:p,url:bu}},"JobCardST:0":{title:"We're hiring",subtitle:"Be Yourself - That's how we want you to be. Find your place in our Team!",description:"",link:{id:5,text:"Browse Jobs",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fjobs"}},"SubmitTutorialST:1":{title:br,text:bs,link:{id:bt,text:$,newWindow:p,url:bu}},"FooterST:0":{linkSections:[{id:13,title:"netcup",navigationLinks:[{id:161,text:"Domains",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fdomains\u002Fbuy-register-domain"},{id:162,text:"Special Offers",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fdeals"},{id:163,text:be,newWindow:p,url:bf},{id:164,text:"VPS",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fserver\u002Fvps"}]},{id:14,title:M,navigationLinks:[{id:166,text:"SSL Certificates",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fssl-certificates"},{id:167,text:"More Products",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fsoftware-licenses"}]},{id:15,title:"netcup Pro",navigationLinks:[{id:168,text:"Managed Server",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fprofessional\u002Fmanaged-server"},{id:170,text:"Dedicated Server",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fprofessional\u002Fdedicated-servers"},{id:169,text:"Colocation",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fprofessional\u002Fcolocation-housing"},{id:171,text:"Software Development",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fprofessional\u002Fsoftware-development"}]},{id:16,title:"Community",navigationLinks:[{id:172,text:ac,newWindow:p,url:"https:\u002F\u002Fforum.netcup.de\u002F"},{id:173,text:ad,newWindow:p,url:"\u002Ftutorials"},{id:236,text:ae,newWindow:p,url:"https:\u002F\u002Fforum.netcup.de\u002Finformationen\u002Fnetcup-community\u002Fmoderator-innen\u002F"}]}],socialLinks:{facebook:"https:\u002F\u002Fwww.facebook.com\u002Fprofile.php?id=61560847662410",twitter:"https:\u002F\u002Fx.com\u002Fnetcup_global",linkedIn:"https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002F8340033",mastodon:"https:\u002F\u002Fnetcup.cafe\u002F@netcup",bluesky:"https:\u002F\u002Fbsky.app\u002Fprofile\u002Fnetcup.bsky.social",instagram:"https:\u002F\u002Fwww.instagram.com\u002Fnetcup_global\u002F"},bottomLinks:[{id:bg,text:"T&C",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fterms-and-conditions"},{id:179,text:"Privacy Policy",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fcontact\u002Fdata-privacy"},{id:180,text:"Legal Notice",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fcontact\u002Flegal-notice"},{id:181,text:"Disclaimer",newWindow:p,url:"https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fcontact\u002Fdisclaimer-legal-information"},{id:248,text:"Cookie-Consent",newWindow:C,url:"javascript:window.CookieOptIn.toggle(true)"}]}},mutations:[]}}("text","element","span","\n","token","p","function","code"," ","variable","div","nuxt-content-highlight","pre","line-numbers","a",true,"sudo","language-bash","true",-1,"icon","icon-link","parameter",2,"h2","punctuation","\\","strong",false,"operator",3,"h3","docker","nofollow","noopener","noreferrer","_blank","number",null,"apt-get","\n    ","language-text","$(",")","blockquote",".","li","docker-compose","install","curl","builtin","class-name","\u003E","Learn more","illu_vServer_ohneSchatten.svg",void 0,"Forum","Tutorials","Community Team","ufw","en","introduction","Introduction","requirements","Requirements","step-1---preparation","Step 1 - Preparation","step-2---add-custom-repository-and-install-docker","Step 2 - Add custom repository and install Docker","step-21---add-custom-apt-repository","Step 2.1 - Add custom apt repository","step-22---install-docker","Step 2.2 - Install Docker","step-23---test-if-docker-is-working","Step 2.3 - Test if Docker is working","step-3---set-up-ufw-so-docker-doesnt-bypass-firewall-rules-optional","Step 3 - Set up ufw so Docker doesn't bypass firewall rules (optional)","step-31---enable-ufw-optional","Step 3.1 - Enable ufw (optional)","step-32---set-up-ufw-config","Step 3.2 - Set up ufw config","step-33---using-ufw-to-open-ports","Step 3.3 - Using ufw to open ports","step-34---using-the-ufw-docker-tool-for-easier-setup","Step 3.4 - Using the ufw-docker tool for easier setup","step-4---add-your-user-to-docker-group-to-use-docker-without-sudo-optional","Step 4 - Add your user to 'docker' group to use Docker without sudo (optional)","step-5---install-docker-compose-optional","Step 5 - Install docker-compose (optional)","step-6---install-portainer-optional","Step 6 - Install Portainer (optional)","conclusion","Conclusion","license","License","contributors-certificate-of-origin","Contributor's Certificate of Origin","root"," update\n","|","-o","string","https:\u002F\u002Fgithub.com\u002Fchaifeng\u002Fufw-docker","80","chmod"," ufw-docker ","\u003C","comment"," run ","uname","9443","-v","Root-Server","https:\u002F\u002Fwww.netcup.com\u002Fen\u002Fserver\u002Froot-server",178,94,"https:\u002F\u002Fforum.netcup.de",95," \u002Ftutorials",268,"Events","\u002Fevents\u002F",97,"\u002F#communityteam","\u002Fde\u002Fuebersetzungen","Submit your tutorial","Get 60€ netcup vouchers for every published tutorial.",275,"https:\u002F\u002Fgithub.com\u002Fnetcup-community\u002Fcommunity-tutorials")));