File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # ==
3+ # Script to set up a new Debian 11 machine to support BlogDB with docker & dex.
4+ # ==
5+
6+ if $UID -ne 0; then
7+ echo " Error: This script must be run as root." ;
8+ exit -1;
9+ fi
10+
11+ # ==
12+ # Update the packages and install supporting software.
13+ # ==
14+ apt-get update -y;
15+ apt-get upgrade -y;
16+ apt-get install -y git build-essential cpanminus liblocal-lib-perl;
17+
18+ # ==
19+ # Install Docker
20+ # ==
21+
22+ # Install packages we need to have in order to install docker.
23+ apt-get update -y;
24+ apt-get install -y ca-certificates curl gnupg lsb-release;
25+
26+ # Get keys from docker for their packages.
27+ curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg;
28+
29+ # Add the docker apt repo.
30+ echo \
31+ " deb [arch=$( dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
32+ $( lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list;
33+
34+ # Finally, actually install docker.
35+ apt-get update -y;
36+ apt-get install -y docker-ce docker-ce-cli containerd.io;
37+
38+ # Setup local::lib for the future and then enable it for the rest of this script.
39+
40+ echo ' eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >> /root/.bashrc;
41+ source /root/.bashrc;
42+
43+ # Install App::Dex
44+ cpanm App::Dex
45+
46+ echo
47+ echo
48+ echo " The system is now setup to run docker containers from root."
49+ echo
50+ echo " You should exit this shell and reconnect, or source ~/.bashrc"
51+ echo " so that your perl environment will be setup and dex will run."
52+ echo
53+ echo " Then, get BlogDB and proceed:"
54+ echo " SSH: git@github.com:symkat/BlogDB.git"
55+ echo " HTTP: https://github.com/symkat/BlogDB.git"
56+ echo
You can’t perform that action at this time.
0 commit comments