update docker file
parent
7f7c3d80f5
commit
df2395ff1b
|
@ -1,15 +1,12 @@
|
||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
# Update package list and install systemd
|
RUN apt update \
|
||||||
# RUN apt-get update && apt-get install -y systemd && rm -rf /var/lib/apt/lists/*
|
&& apt install -y wget systemd kmod systemd-sysv \
|
||||||
RUN apt-get update && apt-get install -y systemd kmod systemd-sysv && rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Configure systemd (optional: set default target)
|
|
||||||
RUN systemctl set-default multi-user.target
|
RUN systemctl set-default multi-user.target
|
||||||
|
|
||||||
# Remove unnecessary systemd units to speed up boot (optional)
|
|
||||||
RUN find /etc/systemd/system /lib/systemd/system \
|
RUN find /etc/systemd/system /lib/systemd/system \
|
||||||
-path '*.wants/*' -not -name '*systemd*' -exec rm -f {} \;
|
-path '*.wants/*' -not -name '*systemd*' -exec rm -f {} \;
|
||||||
|
|
||||||
# Set systemd as the entrypoint
|
|
||||||
ENTRYPOINT ["/lib/systemd/systemd", "--system"]
|
ENTRYPOINT ["/lib/systemd/systemd", "--system"]
|
Loading…
Reference in New Issue