Cake official Docker files with Cake pre-installed
docker run -it --rm cakebuild/cake:2.1-sdk cake --version
FROM cakebuild/cake:v0.30.0-2.1-sdk AS builder
RUN apt-get update -qq \
&& curl -sL https://deb.nodesource.com/setup_9.x | bash - \
&& apt-get install -y nodejs
ADD . /src
RUN Cake /src/build.cake --Target=Publish
FROM microsoft/dotnet:2.1.3-aspnetcore-runtime
WORKDIR app
COPY --from=builder /src/output .
CMD ["dotnet","CoreWiki.dll"]
CI servers will at least on each release of Cake or when this repository updated build and publish new Docker images. Each build will also be tagged with version number, so you can pin to a specific version of Cake.
I.e. if v0.30.0
is latest release Cake version then it'll be tagged 2.1-sdk
and v0.30.0-2.1-sdk
, when v0.31.0
is released then it'll be tagged 2.1-sdk
and v0.31.0-2.1-sdk
, and v0.30.0-2.1-sdk
will be untouched.
Currently the images come pre-installed with a self-contained version of Cake.CoreCLR, this means modules, addins and tools need to be .NET Core or .NET Standard 2.0 compatible.