Mono

Running Chocolatey on Linux

Update: This docker image is now available on the Docker Hub as linuturk/mono-choco.

Do you want to create Chocolatey packages but don’t want to run a Windows server? Use this Dockerfile to build Chocolatey and do your package development without a Windows system.

FROM mono:3.12.1

MAINTAINER Justin Phelps

RUN apt-get update && apt-get install -y wget unzip

WORKDIR /usr/local/src/choco
RUN wget https://github.com/chocolatey/choco/archive/stable.zip
RUN unzip stable.zip
RUN rm stable.zip

WORKDIR /usr/local/src/choco/choco-stable
RUN chmod +x build.sh
RUN chmod +x zip.sh
RUN ./build.sh

WORKDIR /usr/local/bin
RUN ln -s /usr/local/src/choco/choco-stable/build_output/chocolatey

COPY choco /usr/local/bin/choco

WORKDIR /root

In the same directory as the Dockerfile, place a file called choco with executable permissions. The content of this file should be: