Rebuild rego-tunnel-linux with systemd as init
Some checks failed
Test / test (push) Has been cancelled

This commit is contained in:
2025-12-25 01:08:20 +00:00
parent 06662a294b
commit a17fe5843d
7 changed files with 121 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y \
RUN apt-get update && (apt-get install -y libasound2t64 || apt-get install -y libasound2) && rm -rf /var/lib/apt/lists/*
# Configure systemd - remove unnecessary units
# Configure systemd for container use
RUN cd /lib/systemd/system/sysinit.target.wants/ && \
ls | grep -v systemd-tmpfiles-setup | xargs rm -f && \
rm -f /lib/systemd/system/multi-user.target.wants/* && \
@@ -55,9 +55,25 @@ RUN chmod +x /root/vpn-sso.sh
# Copy AnyConnect preferences
COPY .anyconnect_global /opt/cisco/secureclient/vpn/.anyconnect_global
# Copy and install systemd services
COPY rego-vpn-setup.sh /usr/local/bin/rego-vpn-setup.sh
COPY rego-vpn-gui.sh /usr/local/bin/rego-vpn-gui.sh
RUN chmod +x /usr/local/bin/rego-vpn-setup.sh /usr/local/bin/rego-vpn-gui.sh
COPY rego-vpn.service /etc/systemd/system/rego-vpn.service
COPY cisco-vpnagentd.service /etc/systemd/system/cisco-vpnagentd.service
# Enable services
RUN systemctl enable rego-vpn.service && \
systemctl enable cisco-vpnagentd.service
# Keep old entrypoint as fallback script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
VOLUME [ "/sys/fs/cgroup" ]
EXPOSE 8806
ENTRYPOINT ["/entrypoint.sh"]
# Use systemd as init
STOPSIGNAL SIGRTMIN+3
ENTRYPOINT ["/lib/systemd/systemd"]