Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile to Enable Mono Based Choco Builds #1153

Merged
merged 1 commit into from
Apr 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docker/Dockerfile.linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM mono:3.12.1

MAINTAINER Justin Phelps <[email protected]>

COPY . /usr/local/src/choco/

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

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

COPY docker/choco_wrapper /usr/local/bin/choco

WORKDIR /root
12 changes: 12 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Building Docker Image
=====================

This directory contains the necessary Dockerfile and wrapper script for building a Docker Image. This is a Linux based image that builds and runs choco.exe with mono.

To build this image yourself, follow these steps:

1. Clone down the repository using `git clone https://github.com/chocolatey/choco.git`.
1. Change directories to the root of the repository.
1. Run the docker build command. `docker build -t mono-choco -f docker/Dockerfile.linux .` (the trailing . is important)
1. Run your new image using the command `docker run -ti --rm mono-choco /bin/bash`
1. Test choco by running `choco -h`. You should see the help message from choco.exe.
3 changes: 3 additions & 0 deletions docker/choco_wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

mono /usr/local/bin/chocolatey/choco.exe "$@" --allow-unofficial