Menu
New posts
Home
Latest activity
Log in
Register
What's new
Search
Search
Search titles only
By:
Latest activity
Register
Menu
Log in
Register
Operating System
Linux
Debian
11
Docker
Install docker and docker-compose
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
<p>[QUOTE="root, post: 7, member: 1"]</p><p>[CODE=bash]# update package lists</p><p>apt-get update</p><p></p><p></p><p># install additional packages</p><p>apt -y install ca-certificates curl gnupg lsb-release</p><p># install and adding PGP key from Docker repository</p><p>curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg</p><p># adding a Docker repository</p><p>echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null</p><p></p><p></p><p># update package lists</p><p>apt-get update</p><p></p><p></p><p># if it shows an error while updating lists, enter:</p><p>apt-get install apt-transport-https</p><p></p><p># install docker and docker-compose and additional packages</p><p>apt -y install docker-ce docker-ce-cli containerd.io docker-compose</p><p># docker is disabled by default. turn on</p><p>systemctl start docker</p><p># turn on startup with system</p><p>systemctl enable docker</p><p></p><p># allow sudo access for the user</p><p>usermod -aG sudo user_name</p><p># If you want to use docker as a user, enter</p><p># do not forgot login into user account</p><p>su user_name</p><p>sudo groupadd docker</p><p></p><p># add the current user to the docker group</p><p>sudo usermod -aG docker $USER</p><p># the $USER variable means that the current user, on whose behalf the session is running,</p><p># will be added to the docker group.</p><p></p><p># restart docker</p><p>systemctl start docker</p><p></p><p># check the result of docker work</p><p>docker ps[/CODE]</p><p>[/QUOTE]</p>
[QUOTE="root, post: 7, member: 1"] [CODE=bash]# update package lists apt-get update # install additional packages apt -y install ca-certificates curl gnupg lsb-release # install and adding PGP key from Docker repository curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg # adding a Docker repository echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null # update package lists apt-get update # if it shows an error while updating lists, enter: apt-get install apt-transport-https # install docker and docker-compose and additional packages apt -y install docker-ce docker-ce-cli containerd.io docker-compose # docker is disabled by default. turn on systemctl start docker # turn on startup with system systemctl enable docker # allow sudo access for the user usermod -aG sudo user_name # If you want to use docker as a user, enter # do not forgot login into user account su user_name sudo groupadd docker # add the current user to the docker group sudo usermod -aG docker $USER # the $USER variable means that the current user, on whose behalf the session is running, # will be added to the docker group. # restart docker systemctl start docker # check the result of docker work docker ps[/CODE] [/QUOTE]
Preview
Name
Post reply
Operating System
Linux
Debian
11
Docker
Install docker and docker-compose
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top