2023-03-14 15:05:16 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-01-20 03:09:48 -05:00
|
|
|
# Copyright (C) 2021-2024 Thien Tran
|
2023-09-27 03:56:28 -04:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
|
|
# use this file except in compliance with the License. You may obtain a copy of
|
|
|
|
# the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations under
|
|
|
|
# the License.
|
|
|
|
|
2023-03-14 15:05:16 -04:00
|
|
|
#Run this after GCP-Debian-11.sh
|
|
|
|
|
2023-12-01 21:54:20 -05:00
|
|
|
output(){
|
2023-12-04 18:17:55 -05:00
|
|
|
echo -e '\e[36m'"$1"'\e[0m';
|
2023-12-01 21:54:20 -05:00
|
|
|
}
|
|
|
|
|
2023-12-02 06:56:58 -05:00
|
|
|
unpriv(){
|
|
|
|
sudo -u nobody "$@"
|
|
|
|
}
|
|
|
|
|
2023-03-14 15:05:16 -04:00
|
|
|
# Install Docker
|
|
|
|
sudo mkdir -m 0755 -p /etc/apt/keyrings
|
2023-12-02 06:56:58 -05:00
|
|
|
unpriv curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
2023-03-14 15:05:16 -04:00
|
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
|
|
sudo apt update
|
2023-03-17 12:51:38 -04:00
|
|
|
sudo apt -y --no-install-recommends install docker-ce
|
2023-03-14 15:05:16 -04:00
|
|
|
|
|
|
|
# Install gVisor
|
2023-12-02 06:56:58 -05:00
|
|
|
unpriv curl -fsSL https://gvisor.dev/archive.key | sudo gpg --dearmor -o /usr/share/keyrings/gvisor-archive-keyring.gpg
|
2023-03-14 15:05:16 -04:00
|
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/gvisor-archive-keyring.gpg] https://storage.googleapis.com/gvisor/releases release main" | sudo tee /etc/apt/sources.list.d/gvisor.list > /dev/null
|
2023-12-01 21:54:20 -05:00
|
|
|
sudo apt update
|
2023-03-17 12:51:38 -04:00
|
|
|
sudo apt -y --no-install-recommends install runsc
|
2024-03-30 19:35:52 -04:00
|
|
|
sudo runsc installl
|
2023-08-16 06:22:28 -04:00
|
|
|
sudo systemctl restart docker
|