mirror of
https://github.com/pockethost/pockethost.git
synced 2025-03-30 15:08:30 +00:00
setup script update
This commit is contained in:
parent
0cd9c6e4a6
commit
ed6eb61378
18
setup.sh
18
setup.sh
@ -4,6 +4,23 @@
|
||||
apt-get update -y
|
||||
apt-get upgrade -y
|
||||
|
||||
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do apt-get remove $pkg; done
|
||||
|
||||
# Add Docker's official GPG key:
|
||||
apt-get update
|
||||
apt-get install ca-certificates curl
|
||||
install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
||||
chmod a+r /etc/apt/keyrings/docker.asc
|
||||
|
||||
# Add the repository to Apt sources:
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
apt-get update
|
||||
|
||||
apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
|
||||
# Create user pockethost with no password
|
||||
adduser --disabled-password --gecos "" pockethost
|
||||
@ -15,6 +32,7 @@ echo "pockethost ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/pockethost
|
||||
ufw allow OpenSSH
|
||||
ufw allow https
|
||||
ufw allow http
|
||||
ufw allow ftp
|
||||
echo "y" | ufw enable
|
||||
|
||||
# Copy root's authorized_keys to pockethost
|
||||
|
Loading…
x
Reference in New Issue
Block a user