Rebuild rego-tunnel-linux with systemd as init
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user