-
Notifications
You must be signed in to change notification settings - Fork 24
/
how-to-docker.txt
61 lines (38 loc) · 2.44 KB
/
how-to-docker.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#This AutoGPT GUI is containerized, you should install the latest docker. Here are instructions for installing the latest docker and docker-compose (1.26) on your local ubuntu/debian box.
###Remove any existing docker and install the latest
#--------------------------------
sudo apt-get remove docker docker-engine docker.io containerd runc
#----------------------
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
# pull down the key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
#-------------
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
-----------------------
#Install latest docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
#You have successfully installed Docker and ready to run any containerized applications on this machine.
#######################################
Important troubleshooting tips for Docker
(sudo) docker ps -a | Show all containers and their status, look for any that may be down
(sudo) docker restart/start/stop CONTAINER_NAME | Reboot the container or shut it down
(sudo) docker logs CONTAINER_NAME or ID | Use your actual container name or container ID with this command to look at its logs
(sudo) docker exec -it CONTAINER_NAME or ID /bin/bash | Use this to conenct to console into this containers command line
If a container is down, look at its logs to try to determine why it is down, if its failing, it probably doesnt like one or more of your env settings and it should tell you about that in the logs.
#Note
You can install mycli to manage MySQL database locally with command prompt or if you have PHPMyAdmin you can conenct on this machines, port 3306, using root and the password you set in your env files.