canvas icon indicating copy to clipboard operation
canvas copied to clipboard

Dockerfile?

Open alanhoyle opened this issue 8 years ago • 3 comments

To make it easier to run on container-aware linux distributions, it might be good to distribute a Docker Image or at least a Dockerfile.

FROM mono

RUN mkdir /canvas

COPY * /canvas/

ENTRYPOINT ["mono", "/canvas/Canvas.exe"]

CMD ["--help"]

alanhoyle avatar Jul 29 '16 18:07 alanhoyle

Thanks @alanhoyle ! This is on our TODO list.

eroller avatar Aug 31 '16 20:08 eroller

The Dockerfile above building "FROM mono" docker image no longer works with the current Canvas.

Here is an updated Dockerfile that builds off of the microsoft/dotnet docker image.

FROM microsoft/dotnet:sdk

ARG CANVAS_VERSION=1.39.0.1598
ENV CANVAS_VERSION=${CANVAS_VERSION}

RUN curl -L https://github.com/Illumina/canvas/releases/download/${CANVAS_VERSION}%2Bmaster/Canvas-${CANVAS_VERSION}.master_x64.tar.gz | tar xvz && ln -s /Canvas-${CANVAS_VERSION}+master_x64 /canvas && rmdir /${CANVAS_VERSION}+master

# the Canvas executable requires being run by bash, so adding the #! to it lets it work:

RUN echo '#! /usr/bin/env bash' | cat - /canvas/Canvas > /TEMP && mv /TEMP /canvas/Canvas

# the dotnet executable requires $HOME/.dotnet.  In some environments, this does not exist or 
# the user doesn't have write permissions.  This changes it to /tmp so it's available to anyone. 

ENV HOME=/tmp
RUN chmod +x /canvas/Canvas

ENV PATH="/canvas:${PATH}"

CMD Canvas --help

alanhoyle avatar Mar 27 '19 19:03 alanhoyle

Note that I can't find in the Canvas source code where the Canvas bash script is located. The above Dockerfile builds an image based on the 1.39.0.1598 release of Canvas and the most recent version of the Microsoft dotnet SDK.

alanhoyle avatar Mar 27 '19 21:03 alanhoyle