====== Alpine ====== https://alpinelinux.org/ ===== Установка ===== # ISO - root без пароля setup-alpine # раскладку лучше оставить none # дальше пройти мастер https://wiki.alpinelinux.org/wiki/Alpine_setup_scripts#setup-alpine\\ # install Hyper-V guest services apk add hvtools # enable the services rc-service hv_fcopy_daemon start rc-service hv_kvp_daemon start rc-service hv_vss_daemon start # start on boot rc-update add hv_fcopy_daemon rc-update add hv_kvp_daemon rc-update add hv_vss_daemon https://wiki.alpinelinux.org/wiki/Hyper-V_guest_services\\ https://wiki.alpinelinux.org/wiki/Tutorials_and_Howtos#Post-Install ===== SSH ===== Enable root login over SSH (not recommended) echo "PermitRootLogin yes" >> /etc/ssh/sshd_config /etc/init.d/sshd restart ===== Установка Docker ===== /etc/apk/repositories # раскомментировать community apk -U upgrade # update & upgrade apk add docker apk add docker-compose rc-service docker start rc-update add docker https://wiki.alpinelinux.org/wiki/Enable_Community_Repository\\ https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Packages_and_Repositories\\ https://wiki.alpinelinux.org/wiki/Docker ===== Часовой пояс в контейнере ===== Необходима установка tzdata. Dockerfile: FROM alpine RUN apk add tzdata CMD cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime https://gitlab.alpinelinux.org/alpine/aports/-/issues/5543 Альтернативный вариант - пробросить ''/etc/localtime'' с хоста. В docker-compose.yml: volumes: - /etc/localtime:/etc/localtime:ro ===== cron ===== test -d /etc/periodic/daily9am || mkdir /etc/periodic/daily9am ; \ grep -q daily9am /etc/crontabs/root || echo -e "0\t9\t*\t*\t*\trun-parts /etc/periodic/daily9am" >> /etc/crontabs/root ; \ echo "#!/bin/sh" > /etc/periodic/daily9am/birthdays ; \ echo 'wget -O - -q "https://bva.dyndns.info/webtrees/reminder-cron/run?key=secretKeyHere"' >> /etc/periodic/daily9am/birthdays ; \ chmod a+x /etc/periodic/daily9am/birthdays ; \ crond https://devopsheaven.com/cron/docker/alpine/linux/2017/10/30/run-cron-docker-alpine.html