Docker config/preinstall/postinstall steps
This commit is contained in:
parent
b624232e27
commit
aa96b66372
3 changed files with 32 additions and 0 deletions
14
src/steps-config/20-docker.sh
Executable file
14
src/steps-config/20-docker.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
task_begin "Configuring Docker apt repository";
|
||||||
|
# curl -fsSL https://get.docker.com -o /tmp/get-docker.sh
|
||||||
|
# chmod +x /tmp/get-docker.sh
|
||||||
|
# sudo sh /tmp/get-docker.sh
|
||||||
|
echo "deb [arch=$(dpkg --print-architecture)] http://download.docker.com/linux/raspbian buster stable" >/etc/apt/sources.list.d/docker.list;
|
||||||
|
|
||||||
|
queue_apt_install docker-ce;
|
||||||
|
|
||||||
|
task_end "$?";
|
||||||
|
|
||||||
|
queue_preinstall_step "20-docker.sh";
|
||||||
|
queue_postinstall_step "20-docker.sh";
|
11
src/steps-postinstall/20-docker.sh
Normal file
11
src/steps-postinstall/20-docker.sh
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ ! -e "/etc/docker/daemon.json" ]]; then
|
||||||
|
task_begin "Updating Docker configuration";
|
||||||
|
echo '{"insecure-registries":["registry.service.mooncarrot.space:5000"]}' >/etc/docker/daemon.json;
|
||||||
|
task_end "$?";
|
||||||
|
fi
|
||||||
|
|
||||||
|
task_begin "Reloading docker systemd service";
|
||||||
|
systemctl reload docker.service
|
||||||
|
task_end "$?";
|
7
src/steps-preinstall/20-docker.sh
Normal file
7
src/steps-preinstall/20-docker.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
task_begin "docker: installing libseccomp2 from ${VERSION_CODENAME}-backports";
|
||||||
|
# Fix apt update errors inside docker containers
|
||||||
|
# Ref https://blog.samcater.com/fix-workaround-rpi4-docker-libseccomp2-docker-20/
|
||||||
|
apt-get install libseccomp2 -t "${VERSION_CODENAME}-backports"
|
||||||
|
task_end "$?";
|
Loading…
Reference in a new issue