43 lines
1.8 KiB
Raw Normal View History

2021-12-25 18:43:01 +00:00
set -ex
cd "$(dirname "$0")"
sudo apt-get remove docker docker-engine containerd runc
curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
2021-12-25 18:43:01 +00:00
sudo apt-get update
sudo apt-get install -y wait-for-it dnsutils rsync sshfs apt-transport-https ca-certificates curl gnupg lsb-release docker-ce-cli python3-pip libusb-1.0-0-dev pinentry-curses
2021-12-25 18:43:01 +00:00
# install lxd as a snap if it's not installed. We only really use the LXC part of this package.
if ! snap list | grep -q lxd; then
2021-12-25 18:43:01 +00:00
sudo snap install lxd
# let's ensure docker-machine is available. This is only temporary though.
curl -L$(uname -s)-$(uname -m) >/tmp/docker-machine &&
chmod +x /tmp/docker-machine &&
sudo cp /tmp/docker-machine /usr/local/bin/docker-machine
# base=""
# curl -s -L "$base/docker-machine-$(uname -s)-$(uname -m)" >/tmp/docker-machine
# sudo mv /tmp/docker-machine /usr/local/bin/docker-machine
# chmod +x /usr/local/bin/docker-machine
2021-12-25 18:43:01 +00:00
pip3 install trezor_agent
sudo cp ./51-trezor.rules /etc/udev/rules.d/51-trezor.rules
# if there's a ./env file here, let's execute it. Admins can put various deployment-specific things there.
if [ ! -f "$(pwd)/env" ]; then
echo "#!/bin/bash" >> "$(pwd)/env"
chmod 0744 "$(pwd)/env"
echo "We stubbed out a '$(pwd)/env' file for you. Put any LXD-remote specific information in there."
echo "Check out '' for an example."
exit 1