Skip to content

Instantly share code, notes, and snippets.

@kikitux
Last active September 12, 2024 14:07
Show Gist options
  • Save kikitux/33018db5ba00b1a2a65e3644cfa5a787 to your computer and use it in GitHub Desktop.
Save kikitux/33018db5ba00b1a2a65e3644cfa5a787 to your computer and use it in GitHub Desktop.
Install docker-ce in odroid xu4/xu4q linux-arm arm
#!/usr/bin/env bash
set -e
apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository \
"deb [arch=armhf] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-get update
mkdir -p /etc/docker
echo -e '{\n\t"storage-driver": "btrfs"\n}' > /etc/docker/daemon.json
apt-get install -y docker-ce
docker run --rm hello-world
#configure docker port
[ -f /etc/systemd/system/docker.service.d/docker.conf ] || {
mkdir -p /etc/systemd/system/docker.service.d
cat > /etc/systemd/system/docker.service.d/docker.conf <<EOF
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
EOF
systemctl daemon-reload
systemctl restart docker
}
docker swarm init --advertise-addr 192.168.178.2
docker node ls
#portainer
docker run -d -p 9000:9000 --restart always -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer:linux-arm
#!/usr/bin/env bash
git clone https://github.com/openfaas/faas
cd faas
./deploy_stack.sh
curl -sSL https://cli.openfaas.com | sudo sh
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
if [ -f /aafirstboot ]; then /aafirstboot start ; fi
if [ -b /dev/sda ] && [ -b /dev/sdb ]; then
for mp in `grep btrfs /etc/fstab | grep -v '^#' | cut -d' ' -f2` ; do
mountpoint ${mp} || mount ${mp}
done
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment