0

I am trying to install sluethkit on my windows based conatiner but I am not able to do it. In ubuntu based docker image I was doing it by running apt-get sluethkit , what is the way to do it in windows based conatiner I am using,

This is my docker file I am using a python based windows container as my base image.

FROM python:3.7-windowsservercore-1809
#ADD scripts/installChoco.ps1 /installChoco.ps1
#TO INSTALL CHOCO
RUN powershell Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
#RUN powershell .\installChoco.ps1 -Wait; Remove-Item c:\installChoco.ps1 -Force;
RUN powershell choco install sleuthkit -y
WORKDIR /opt
COPY . .

#RUN
CMD ["test.py"]
ENTRYPOINT ["python"]

I want to install sleythkit directly from the command line or powershell since it will be used in the client machine.

I tried installing chocolatey package manager which does the same job as apt-get command in Linux.

I was able to install chocolatey but I am not able to install sluethkit or other applications, it shows me this error while building the dockerfile.

Error using chocolatey to install sleuthkit

log file

log file

SoMe
  • 11
  • 2
  • That's still not really all that helpful I guess. It is just a 7-Zip error but as it is just a zip download anyway that gets extracted. Did you think about just including it? Might also be related to your base image if you look at [this github issue](https://github.com/chocolatey/choco/issues/2038). Running 32 bit applicaton might just not work with your image. – Seth Aug 13 '21 at 09:34
  • 2
    Also please paste logs as text, not pictures as then they are permanent and searchable – Nick.Mc Aug 13 '21 at 09:45
  • To add to what Nick mentioned, the log file is quite a bit longer as well - the relevant parts seems to be excluded from the picture you provided. – ferventcoder Aug 18 '21 at 22:24
  • So when you run Chocolatey, you don't need to run PowerShell. `RUN powershell choco install sleuthkit -y` can be `RUN choco install sleuthkit -y`. – ferventcoder Aug 18 '21 at 22:25
  • 1
    As far as how to install things in Docker with Chocolatey, here's a working example that Microsoft uses - https://github.com/Microsoft/vsts-agent-docker/blob/f870fbf259a803c6a6d902e1c01f631936069d66/windows/servercore/10.0.14393/standard/VS2017/Dockerfile – ferventcoder Aug 18 '21 at 22:27

0 Answers0