Install d.rymcg.tech
The installation process for Docker and d.rymcg.tech can be automated by the following Bash script.
Before running the command below, you should edit the environment variables defined at the top:
-
ROOT_DOMAIN
needs to be a dedicated sub-domain name assigned to the Pi (e.g.,pi.example.com
). -
ALIASES
is already preset with the aliases you’ll be needing for this book:pi
andsentry
. You may customize the names here if you wish.
ROOT_DOMAIN=pi.example.com \
ALIASES=pi,sentry \
bash <(curl -L \
https://github.com/EnigmaCurry/d.rymcg.tech/blob/master/_scripts/bootstrap_sworkstation.sh?raw=true)
Once the script has finished, log out from the Pi and log back in. You are done, and you may proceed to the next section (Install Traefik).
If you don’t like running automatic scripts, you can follow the manual installation steps listed in the appendix.
If you are wary of running curlbombs (you should be) you may want to download and review the script (bootstrap_sworkstation.sh) and run it manually:
## Download and set executable:
curl -LO https://github.com/EnigmaCurry/d.rymcg.tech/blob/master/_scripts/bootstrap_sworkstation.sh?raw=true
chmod a+x ./bootstrap_sworkstation.sh
## Set the config variables as exported:
export ROOT_DOMAIN=pi.example.com
export ALIASES=pi,sentry
## Examine the script before running it.
## Run it: ./bootstrap_sworkstation.sh
This script is designed only to be run on a freshly installed Debian-derived system (including Raspberry Pi OS). There is another script for machines running Fedora.
Script configuration
Here are the environment variables that the bootstrap script supports:
ALIASES
Throughout this book, a short command alias is used to control the
d.rymcg.tech Docker context of the local host (named pi
) and another
alias for the remote sentry (named sentry
), but you can rename these
aliases to any names you like. ALIASES
is a comma separated list of
alias names to create: pi,sentry
.
ROOT_DOMAIN
ROOT_DOMAIN
should be a unique dedicated sub-domain assigned to your
Docker server (e.g., pi.example.com
). This becomes the default root
domain for every app you install (e.g., whoami.pi.example.com
.) The
default name is only a suggestion and each app can set whatever domain
name they want.
Having a default domain name for each app, one that is unique,
determinstic, and identifiable, will greatly simplify the creation of
DNS records and TLS certificates. With the use of wildcard domain
records, e.g., *.pi.example.com
, you only have to setup DNS records
once per Docker host, even if you install more apps later. In this
book, pi
is just a short identifier to make these URLs unique to a
particular Docker host. The actual interstitial name can be whatever
you like.
SSH_HOST (optional)
A “sworkstation” is defined as a hybrid workstation and server, so by
definition, the sworkstation should be controlling itself. Therfore,
the default SSH_HOST
is localhost
. You don’t need to change this
unless you are making a pure workstation that would be remote
controlling another pure server.
CONTEXT (optional)
The default Docker context will be created with the same name as
SSH_HOST
(localhost
). You don’t need to set this unless you need
to rename the Docker context for some reason.
SYSBOX (optional)
If you need to grant special privileges to your containers, you may do so with Sysbox:
This is only required for some special cases, e.g., rootless
Docker-in-Docker, Faasd, or any image that runs systemd. Set
SYSBOX=true
to enable it.
You may also export SYSBOX_URL
to point to a particular release
package URL to install.