Files
XC_VM/tools/test-install/Dockerfile
T
Divarion-D 453e233352 fix(cron): fix post-install errors in cron jobs and watchdog
- Encryption::generateUniqueCode(): null-coalesce $pass to prevent
  md5(null) deprecation when live_streaming_pass is not yet set
- CacheCronJob: mkdir() with 0755 perms, recursive flag, and
  chown to xc_vm user — fixes Permission denied on tmp/cache/*
- WatchdogCommand: null-safe decode of watchdog_data — fixes
  array offset on null when server has no watchdog history
- ConnectionTracker: guard file_put_contents with is_dir() check
  to prevent writes when CACHE_TMP_PATH does not exist yet
- Dockerfile: install cron package and enable cron.service for
  systemd-based test container
2026-04-06 16:19:09 +03:00

39 lines
1.6 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV container=docker
ENV LC_ALL=C
ENV TZ=UTC
# systemd — необходим для инсталлятора (systemctl enable/start xc_vm)
RUN apt-get update && apt-get install -y --no-install-recommends \
systemd systemd-sysv dbus cron \
lsb-release sudo python3 python3-pip wget curl unzip \
iproute2 net-tools apt-utils ca-certificates gnupg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Убираем только действительно ненужные в контейнере юниты
# НЕ трогаем sysinit.target.wants (journald, tmpfiles, sysctl — нужны)
RUN rm -f /lib/systemd/system/multi-user.target.wants/* \
/lib/systemd/system/local-fs.target.wants/* \
/lib/systemd/system/sockets.target.wants/*udev* \
/lib/systemd/system/sockets.target.wants/*initctl* \
/lib/systemd/system/anaconda.target.wants/* \
/lib/systemd/system/plymouth* \
/lib/systemd/system/systemd-update-utmp*
# Включаем cron.service обратно (удалён вместе с multi-user.target.wants/*)
RUN systemctl enable cron.service
STOPSIGNAL SIGRTMIN+3
WORKDIR /opt/xcvm-install
# Скрипт автоматической установки (подаёт ответы на интерактивные вопросы)
COPY auto_install.sh /opt/xcvm-install/auto_install.sh
RUN chmod +x /opt/xcvm-install/auto_install.sh
# Точка входа — systemd (PID 1), установка запускается вручную или через скрипт
CMD ["/sbin/init"]