Add Setting up docker-compose on a new Debian VPS
commit
2a75a0f1fb
97
Setting up docker-compose on a new Debian VPS.-.md
Normal file
97
Setting up docker-compose on a new Debian VPS.-.md
Normal file
|
@ -0,0 +1,97 @@
|
|||
I just created a cheap new arm64 Debian VPS on Hetzner. Going to deploy traefik + WCH stories app, taking notes from initial login
|
||||
|
||||
```console
|
||||
$ ssh root@$newVPS
|
||||
Linux eu-armsrv-1 6.1.0-17-arm64 #1 SMP Debian 6.1.69-1 (2023-12-30) aarch64
|
||||
|
||||
The programs included with the Debian GNU/Linux system are free software;
|
||||
the exact distribution terms for each program are described in the
|
||||
individual files in /usr/share/doc/*/copyright.
|
||||
|
||||
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
|
||||
permitted by applicable law.
|
||||
# apt update
|
||||
...
|
||||
29 packages can be upgraded. Run 'apt list --upgradable' to see them.
|
||||
# apt upgrade podman podman-compose podman-docker uidmap slirp4netns git
|
||||
...
|
||||
# useradd --groups sudo --create-home --shell `which bash` admin
|
||||
# passwd admin
|
||||
# su admin
|
||||
$ cd
|
||||
$ mkdir .ssh
|
||||
$ sudo cat /root/.ssh/authorized_keys >> .ssh/authorized_keys
|
||||
$ sudo reboot
|
||||
```
|
||||
|
||||
On reboot, follow the instructions at the README of this repo to get Traefik going
|
||||
|
||||
# Scratch all of that ☝️❗
|
||||
|
||||
|
||||
```console
|
||||
$ ssh root@$newVPS
|
||||
Linux eu-armsrv-1 6.1.0-17-arm64 #1 SMP Debian 6.1.69-1 (2023-12-30) aarch64
|
||||
|
||||
The programs included with the Debian GNU/Linux system are free software;
|
||||
the exact distribution terms for each program are described in the
|
||||
individual files in /usr/share/doc/*/copyright.
|
||||
|
||||
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
|
||||
permitted by applicable law.
|
||||
# apt update
|
||||
...
|
||||
29 packages can be upgraded. Run 'apt list --upgradable' to see them.
|
||||
# apt upgrade docker.io docker-compose git vim
|
||||
...
|
||||
Processing triggers for initramfs-tools (0.142) ...
|
||||
update-initramfs: Generating /boot/initrd.img-6.1.0-18-arm64
|
||||
# useradd --groups sudo,docker --create-home --shell `which bash` admin
|
||||
# passwd admin
|
||||
New password:
|
||||
Retype new password:
|
||||
passwd: password updated successfully
|
||||
# su admin
|
||||
$ cd
|
||||
$ mkdir .ssh
|
||||
$ sudo cat /root/.ssh/authorized_keys >> .ssh/authorized_keys
|
||||
$ sudo reboot
|
||||
```
|
||||
|
||||
On reboot you should be able to run `docker ps` and `git clone` this repo and deploy it as outlined in the README
|
||||
|
||||
# Scratch all of that ☝️❗
|
||||
|
||||
The repo version of docker is too old, get the official one. So, once again, from a clean build.
|
||||
|
||||
|
||||
```console
|
||||
$ ssh root@$newVPS
|
||||
Linux eu-armsrv-1 6.1.0-17-arm64 #1 SMP Debian 6.1.69-1 (2023-12-30) aarch64
|
||||
|
||||
The programs included with the Debian GNU/Linux system are free software;
|
||||
the exact distribution terms for each program are described in the
|
||||
individual files in /usr/share/doc/*/copyright.
|
||||
|
||||
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
|
||||
permitted by applicable law.
|
||||
# curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
||||
# echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" > /etc/apt/sources.list.d/docker.list
|
||||
# apt update
|
||||
...
|
||||
29 packages can be upgraded. Run 'apt list --upgradable' to see them.
|
||||
# apt upgrade docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin git vim
|
||||
# useradd --groups sudo,docker --create-home --shell `which bash` admin
|
||||
# passwd admin
|
||||
New password:
|
||||
Retype new password:
|
||||
passwd: password updated successfully
|
||||
# su admin
|
||||
$ cd
|
||||
$ mkdir .ssh
|
||||
$ sudo cat /root/.ssh/authorized_keys >> .ssh/authorized_keys
|
||||
$ sudo reboot
|
||||
|
||||
```
|
Loading…
Reference in a new issue