Skip to content

Commit f5aba68

Browse files
author
Patrick M
committed
add to docker instructions
1 parent 11a2997 commit f5aba68

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

_posts/2023-01-01-lxc-docker-setup.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,40 @@ sudo usermod -aG docker $USER
6565
```
6666

6767
You'll need to logout and log back in for the change to take effect
68+
69+
## Installing Lazydocker
70+
71+
Lazydocker is basically a CLI portainer. Rather than running a service for a single container running in LXC. I like to install lazy docker to manage things. Install is easy by using the script they provide, but I prefer to run my own.
72+
73+
```bash
74+
#!/bin/bash
75+
76+
# allow specifying different destination directory
77+
DIR="/usr/local/bin"
78+
79+
# map different architecture variations to the available binaries
80+
ARCH=$(uname -m)
81+
case $ARCH in
82+
i386|i686) ARCH=x86 ;;
83+
armv6*) ARCH=armv6 ;;
84+
armv7*) ARCH=armv7 ;;
85+
aarch64*) ARCH=arm64 ;;
86+
esac
87+
88+
# prepare the download URL
89+
GITHUB_LATEST_VERSION=$(curl -L -s -H 'Accept: application/json' https://github.com/jesseduffield/lazydocker/releases/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')
90+
GITHUB_FILE="lazydocker_${GITHUB_LATEST_VERSION//v/}_$(uname -s)_${ARCH}.tar.gz"
91+
GITHUB_URL="https://github.com/jesseduffield/lazydocker/releases/download/${GITHUB_LATEST_VERSION}/${GITHUB_FILE}"
92+
93+
# install/update the local binary
94+
curl -L -o lazydocker.tar.gz $GITHUB_URL
95+
tar xzvf lazydocker.tar.gz lazydocker
96+
install -Dm 755 lazydocker -t "$DIR"
97+
rm lazydocker lazydocker.tar.gz
98+
```
99+
100+
Now you can simply run it with the following command.
101+
102+
```bash
103+
lazydocker
104+
```

0 commit comments

Comments
 (0)