Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linux-config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Walmes Marques Zeviani
linux-config
Commits
b13a2d7d
Commit
b13a2d7d
authored
2 years ago
by
Walmes Marques Zeviani
Browse files
Options
Downloads
Patches
Plain Diff
Adds docker instalation.
parent
cbaa785d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
install_docker.sh
+64
-0
64 additions, 0 deletions
install_docker.sh
with
64 additions
and
0 deletions
install_docker.sh
0 → 100644
+
64
−
0
View file @
b13a2d7d
#-----------------------------------------------------------------------
# Documentação oficial.
# https://docs.docker.com/engine/install/ubuntu/
#--------------------------------------------
# Remove versões antigas do docker.
sudo
apt-get remove docker
sudo
apt-get remove docker-engine
sudo
apt-get remove docker.io
sudo
apt-get remove containerd runc
sudo
apt-get remove runc
sudo
apt autoremove
#--------------------------------------------
#
# Atualiza o index.
sudo
apt-get update
# Permite https.
sudo
apt-get
install
\
ca-certificates
\
curl
\
gnupg
\
lsb-release
# Adiciona chave GPG oficial.
sudo mkdir
-p
/etc/apt/keyrings
curl
-fsSL
https://download.docker.com/linux/ubuntu/gpg |
sudo
gpg
--dearmor
-o
/etc/apt/keyrings/docker.gpg
# Configura o repositório.
echo
\
"deb [arch=
$(
dpkg
--print-architecture
)
signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu
\
$(
lsb_release
-cs
)
stable"
|
sudo tee
/etc/apt/sources.list.d/docker.list
>
/dev/null
# Atualiza o index.
sudo
apt-get update
#--------------------------------------------
# Instala.
sudo
apt-get
install
\
docker-ce
\
docker-ce-cli
\
containerd.io
\
docker-compose-plugin
#--------------------------------------------
# Roda exemplo de teste.
sudo
docker run hello-world
#--------------------------------------------
# Cheat sheet.
# https://www.interviewbit.com/docker-cheat-sheet/
# Lista containers ativos.
sudo
docker container
ls
-a
# Lista imagens.
sudo
docker image
ls
#-----------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment