File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,13 +45,19 @@ COPY --from=downloader /etc/apt/keyrings/openspp.gpg /etc/apt/keyrings/
4545COPY --from=downloader /etc/apt/sources.list.d/openspp.list /etc/apt/sources.list.d/
4646
4747# Install ca-certificates first, then OpenSPP package from APT repository
48- # The package and its dependencies will be automatically resolved
48+ # Create a fake systemctl to handle postinst scripts in Docker
4949RUN apt-get update && \
5050 apt-get install -y --no-install-recommends \
5151 ca-certificates \
5252 && apt-get update && \
53- apt-get install -y --no-install-recommends \
53+ # Create fake systemctl for Docker installation \
54+ && echo '#!/bin/sh\n exit 0' > /usr/bin/systemctl \
55+ && chmod +x /usr/bin/systemctl \
56+ # Install OpenSPP package \
57+ && apt-get install -y --no-install-recommends \
5458 openspp-17-daily \
59+ # Remove fake systemctl after installation \
60+ && rm -f /usr/bin/systemctl \
5561 && apt-get clean \
5662 && rm -rf /var/lib/apt/lists/*
5763
Original file line number Diff line number Diff line change @@ -45,12 +45,19 @@ COPY --from=downloader /etc/apt/keyrings/openspp.gpg /etc/apt/keyrings/
4545COPY - - from= downloader / etc/ apt/ sources.list.d/ openspp.list / etc/ apt/ sources.list.d/
4646
4747# Install ca-certificates first, then OpenSPP package from APT repository
48+ # Create a fake systemctl to handle postinst scripts in Docker
4849RUN apt-get update && \
4950 apt-get install -y --no-install-recommends \
5051 ca-certificates \
5152 && apt-get update && \
52- apt-get install -y --no-install-recommends \
53+ # Create fake systemctl for Docker installation \
54+ && echo '#!/bin/sh\nexit 0' > /usr/bin/systemctl \
55+ && chmod +x /usr/bin/systemctl \
56+ # Install OpenSPP package \
57+ && apt-get install -y --no-install-recommends \
5358 openspp-17-daily \
59+ # Remove fake systemctl after installation \
60+ && rm -f /usr/bin/systemctl \
5461 && apt-get clean \
5562 && rm -rf /var/lib/apt/lists/*
5663
You can’t perform that action at this time.
0 commit comments