0

I am trying to install windows defender in a docker container. But Facing the following error while Docker Build.

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

Docker File :

FROM openjdk:11

RUN apt-get -y update

RUN apt-get -y install curl

RUN curl -o microsoft.list https://packages.microsoft.com/config/debian/10/prod.list

RUN mv ./microsoft.list /etc/apt/sources.list.d/microsoft-prod.list

RUN apt-get install -y gpg

RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

RUN apt-get install apt-transport-https

RUN apt-get -y update

RUN apt-get install -y systemd

RUN apt-get install -y mdatp
Testuser
  • 13
  • 3
  • 1
    Systemd is very invasive and wants to manage a lot of kernel-level things; it's not really appropriate to run in a Docker container. (It's possible, but it requires a lot of tweaking and it's not really recommended.) Can you install this program in a way that doesn't require systemd, maybe avoiding its prepackaged version? – David Maze Jun 24 '22 at 09:52
  • @DavidMaze, Thank you for the suggestion. But I don't think windows defender has any other installation package that doesn't require systemd – – Testuser Jun 29 '22 at 06:40

0 Answers0