-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
38 lines (30 loc) · 1.35 KB
/
install.sh
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
#!/bin/bash
set -e
groupadd -r -g 1000 app && useradd -r -u 1000 -m -s /bin/bash -g app app
mkdir -p /usr/share/man/man1
mkdir -p /home/app/.config/gcloud/configurations
chown -R app:app /home/app
chmod -R 700 /home/app/.config
mkdir ${APP_PATH}
chown -R app:app ${APP_PATH}
chmod -R 700 ${APP_PATH}
# echo deb http://ftp.us.debian.org/debian/ bookworm main contrib non-free >> /etc/apt/sources.list
# echo deb http://ftp.us.debian.org/debian/ bookworm-proposed-updates main contrib non-free >> /etc/apt/sources.list
# echo deb http://ftp.us.debian.org/debian/ bookworm-updates main contrib >> /etc/apt/sources.list
# echo deb http://ftp.us.debian.org/debian/ bookworm-backports main contrib non-free >> /etc/apt/sources.list
apt-get update -y
apt-get install -y --no-install-recommends curl \
ca-certificates \
libssl-dev \
python3-crcmod \
apt-transport-https \
lsb-release \
openssh-client \
gnupg
# Cloud SDKインストール
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
apt-get update -y
apt-get install google-cloud-sdk -y --no-install-recommends
rm -rf /var/lib/apt/lists/*
apt-get clean