FROM debian

RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list.d/backports.list && \
  apt-get update && apt-get install --no-install-recommends -y \
    busybox \
    ca-certificates \
    console-data \
    cron \
    curl \
    fdisk \
    ifupdown \
    kbd \
    kmod \
    nano \
    openssh-server \
    python3 \
    python3-apt \
    esmtp \
    systemd-sysv \
    udev \
    vim.tiny \
    wireguard-tools \
  && rm -rf /var/lib/apt/lists/* \
  && rm -rf /etc/ssh/ssh_host_*_key*

RUN rm -rf /etc/init.d/ && \
    mkdir /overlay && \
    ln -sf /init /sbin/init && \
    ln -sf /lib/systemd/system/systemd-netwkord.service /etc/systemd/system/multi-user.target.wants/systemd-networkd.service

COPY default.script /etc/udhcpc/default.script
COPY issue /etc/issue
COPY gai.conf /etc/gai.conf
COPY sshd_config /etc/ssh/sshd_config
