Sign inSign up

chaos/dotnet-cakebuild

By chaos

•Updated almost 7 years ago

Base docker image for automated builds of .NET Core projects using Cake.

Image
0

689

chaos/dotnet-cakebuild repository overview

GitHub tag (latest by date) Docker Cloud Build Status Docker Pulls GitHub

⁠dotnet-cakebuild

A simple Docker image based on the official dotnet core sdk image including Cake⁠ (Github repository⁠) as a global dotnet tool.

You can use this image for automated builds of .NET Core projects using Cake, e.g. with Gitlab.

As of v0.4⁠ the image includes the Docker CLI.

⁠Usage

Use the image as base for your project's CI/CD pipeline. Execute these steps inside your project's source directory:

dotnet cake build.cake --bootstrap
dotnet cake build.cake

The first command loads all dependencies of the Cake script (modules, addins) and the second one actually runs the Cake script.

Arguments can be passed the same way you would using Cake original build.sh. For example:

dotnet cake build.cake --target="CI" --configuration="Debug"

⁠Using Docker from inside the image

To use Docker from inside the image, just mount (bind) the host's docker.sock to your container. For example:

docker run -it \
	-v /var/run/docker.sock:/var/run/docker.sock \
	chaos/dotnet-cakebuild:latest

Be aware of the security implications this brings with. The container from the example can do anything with the host's Docker service, including removing containers and so on.

It's not recommended to use this method outside of a controlled environment.

⁠Pre-built image

A pre-built image can be found on Docker Hub⁠:

docker pull chaos/dotnet-cakebuild:latest

⁠License

MIT⁠

Tag summary

Content type

Image

Digest

Size

347.4 MB

Last updated

almost 7 years ago

docker pull chaos/dotnet-cakebuild