Git Product home page Git Product logo

docker's Introduction

Build on GitHub Ubuntu Latest Agent Build on GitHub Windows 2019 Agent Build on GitHub Windows 2022 Agent Build on Self Hosted Agent Docker Pulls Docker Stars

Cake docker images ๐Ÿฐ๐Ÿณ

Cake official Docker files with .NET SDK and Cake global tool pre-installed.

Images

Images are currently continuously built for last 10 versions of Cake version 1.0 or newer. Currently based on official Microsoft images available ( mcr.microsoft.com/dotnet/sdk ).

To pin to a specific version suffix with Cake version i.e. cakebuild/cake:sdk-6.0 becomes cakebuild/cake:sdk-6.0-v1.3.0.

Tags are added dynamically as new are added to Microsoft container registry, check https://hub.docker.com/r/cakebuild/cake/tags for currently available tags.

Linux Images

Image Based on
cakebuild/cakesdk:6.0 mcr.microsoft.com/dotnet/sdk:6.0
cakebuild/cakesdk:6.0-alpine mcr.microsoft.com/dotnet/sdk:6.0-alpine
cakebuild/cakesdk:6.0-alpine3.14 mcr.microsoft.com/dotnet/sdk:6.0-alpine3.14
cakebuild/cakesdk:6.0-alpine3.16 mcr.microsoft.com/dotnet/sdk:6.0-alpine3.16
cakebuild/cakesdk:6.0-alpine3.17 mcr.microsoft.com/dotnet/sdk:6.0-alpine3.17
cakebuild/cakesdk:6.0-alpine3.18 mcr.microsoft.com/dotnet/sdk:6.0-alpine3.18
cakebuild/cakesdk:6.0-bookworm-slim mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim
cakebuild/cakesdk:6.0-bullseye-slim mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim
cakebuild/cakesdk:6.0-cbl-mariner mcr.microsoft.com/dotnet/sdk:6.0-cbl-mariner
cakebuild/cakesdk:6.0-cbl-mariner1.0 mcr.microsoft.com/dotnet/sdk:6.0-cbl-mariner1.0
cakebuild/cakesdk:6.0-cbl-mariner2.0 mcr.microsoft.com/dotnet/sdk:6.0-cbl-mariner2.0
cakebuild/cakesdk:6.0-focal mcr.microsoft.com/dotnet/sdk:6.0-focal
cakebuild/cakesdk:6.0-jammy mcr.microsoft.com/dotnet/sdk:6.0-jammy
cakebuild/cakesdk:7.0 mcr.microsoft.com/dotnet/sdk:7.0
cakebuild/cakesdk:7.0-alpine mcr.microsoft.com/dotnet/sdk:7.0-alpine
cakebuild/cakesdk:7.0-alpine3.16 mcr.microsoft.com/dotnet/sdk:7.0-alpine3.16
cakebuild/cakesdk:7.0-alpine3.17 mcr.microsoft.com/dotnet/sdk:7.0-alpine3.17
cakebuild/cakesdk:7.0-alpine3.18 mcr.microsoft.com/dotnet/sdk:7.0-alpine3.18
cakebuild/cakesdk:7.0-bookworm-slim mcr.microsoft.com/dotnet/sdk:7.0-bookworm-slim
cakebuild/cakesdk:7.0-bullseye-slim mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim
cakebuild/cakesdk:7.0-cbl-mariner mcr.microsoft.com/dotnet/sdk:7.0-cbl-mariner
cakebuild/cakesdk:7.0-cbl-mariner2.0 mcr.microsoft.com/dotnet/sdk:7.0-cbl-mariner2.0
cakebuild/cakesdk:7.0-jammy mcr.microsoft.com/dotnet/sdk:7.0-jammy
cakebuild/cakesdk:8.0 mcr.microsoft.com/dotnet/sdk:8.0
cakebuild/cakesdk:8.0-alpine mcr.microsoft.com/dotnet/sdk:8.0-alpine
cakebuild/cakesdk:8.0-alpine3.18 mcr.microsoft.com/dotnet/sdk:8.0-alpine3.18
cakebuild/cakesdk:8.0-bookworm-slim mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim
cakebuild/cakesdk:8.0-cbl-mariner mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner
cakebuild/cakesdk:8.0-cbl-mariner2.0 mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0
cakebuild/cakesdk:8.0-jammy mcr.microsoft.com/dotnet/sdk:8.0-jammy

Windows Images

Image Based on
cakebuild/cakesdk:6.0-nanoserver-1809 mcr.microsoft.com/dotnet/sdk:6.0-nanoserver-1809
cakebuild/cakesdk:6.0-nanoserver-20H2 mcr.microsoft.com/dotnet/sdk:6.0-nanoserver-20H2
cakebuild/cakesdk:6.0-nanoserver-ltsc2022 mcr.microsoft.com/dotnet/sdk:6.0-nanoserver-ltsc2022
cakebuild/cakesdk:6.0-windowsservercore-ltsc2019 mcr.microsoft.com/dotnet/sdk:6.0-windowsservercore-ltsc2019
cakebuild/cakesdk:6.0-windowsservercore-ltsc2022 mcr.microsoft.com/dotnet/sdk:6.0-windowsservercore-ltsc2022
cakebuild/cakesdk:7.0-nanoserver-1809 mcr.microsoft.com/dotnet/sdk:7.0-nanoserver-1809
cakebuild/cakesdk:7.0-nanoserver-ltsc2022 mcr.microsoft.com/dotnet/sdk:7.0-nanoserver-ltsc2022
cakebuild/cakesdk:7.0-windowsservercore-ltsc2019 mcr.microsoft.com/dotnet/sdk:7.0-windowsservercore-ltsc2019
cakebuild/cakesdk:7.0-windowsservercore-ltsc2022 mcr.microsoft.com/dotnet/sdk:7.0-windowsservercore-ltsc2022
cakebuild/cakesdk:8.0-nanoserver-1809 mcr.microsoft.com/dotnet/sdk:8.0-nanoserver-1809
cakebuild/cakesdk:8.0-nanoserver-ltsc2022 mcr.microsoft.com/dotnet/sdk:8.0-nanoserver-ltsc2022
cakebuild/cakesdk:8.0-windowsservercore-ltsc2019 mcr.microsoft.com/dotnet/sdk:8.0-windowsservercore-ltsc2019
cakebuild/cakesdk:8.0-windowsservercore-ltsc2022 mcr.microsoft.com/dotnet/sdk:8.0-windowsservercore-ltsc2022

Example usage

Interactive container

docker run --rm -it cakebuild/cake:sdk-8.0 cake --version

Use as builder image

FROM cakebuild/cake:sdk-8.0-alpine-v4.0.0 AS builder

ADD .  /src

RUN Cake /src/build.cake --Target=Publish

FROM mcr.microsoft.com/dotnet/aspnet:8.0

WORKDIR app

COPY --from=builder /src/output .

CMD ["dotnet","MyApp.dll"]

Environment variables

Name Linux Windows
CAKE_PATHS_TOOLS /cake_build/tools C:/cake_build/tools
CAKE_PATHS_ADDINS /cake_build/tools/Addins C:/cake_build/tools/Addins
CAKE_PATHS_MODULES /cake_build/tools/Modules C:/cake_build/tools/Modules

These are set to be able to keep foreign binaries inside your container and also enable caching of tools, addins and modules between docker layers.

Build Infrastructure

Containers are currently built using GitHub Actions.

Operating systems

Windows containers require OS support for specific versions of Windows to be built, so a matrix of Windows versions is used in orchestration using the same build script.

The build script will automatically detect if Docker is configured for building Windows or Linux containers.

But you can also pass parameters to filter to specific base images to build or exclude individual to not build.

Build script parameters

Name Description
remove-base-image Remove mcr base image after build, useful to conserve space used when building
base-image-include-filter Base image must start with this, can be specified multiple times to include multiple base images
base-image-exclude-filter Base image can't start with this, can be specified multiple times, to exclude multiple base images

docker's People

Contributors

arturcic avatar devlead avatar gitfool avatar skovsende-simcorp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker's Issues

Remove 2.0 RC

Post 2.0 release exclude following from builds

  • 2.0.0-rc0002
  • 2.0.0-rc0001

docker/build.cake

Lines 127 to 131 in ad9d96d

where version.CatalogEntry.Version switch {
"1.0.0-rc0001" => false,
"1.0.0-rc0002" => false,
"1.0.0-rc0003" => false,
_ => true

/cake/Cake: Permission denied

/cake/Cake is missing executable permissions. See Cake.Dungeon Docker Job.

~$ docker run --rm -it cakebuild/cake:v0.32.1-2.1-sdk
root@aab27beb84ed:/src# which cake
/cake/cake
root@aab27beb84ed:/src# ls -al /cake/cake
-rwxr-xr-x 1 root root 30 Jan  4 20:43 /cake/cake
root@aab27beb84ed:/src# cat /cake/cake
#!/bin/sh
exec /cake/Cake "$@"
root@aab27beb84ed:/src# ls -al /cake/Cake
-rwxrw-rw- 1 root root 97416 Jan  4 20:42 /cake/Cake

PS. Add a trailing newline to /cake/cake so cat looks clean.

msbuild fail

Hi All ,
I'm using "cakebuild/cake:2.1-sdk-mono" image for my build process.

My build is failing with "bash: msbuild: command not found"
I think it cant find the msbuild location.

Update to latest version of Cake

Docker images should be updated to latest version of Cake.

We should also update release documentation for Cake that updating Docker Image is part of the regular release process.

Add Support for the .netCore 2.2 SDK

I have an app that I'd like to do a multi-stage docker build with cake that will be targeting netcoreapp2.2 that doesn't work as this targets the 2.1 sdk.

The current tag cakebuild/cake:v0.32.1-2.1-sdk doesn't work to build a 2.2 app as that sdk isn't new enough. If we could build a set of containers targeting the microsoft/dotnet:2.2-sdk as the base it would be awesome.

NuGetRestore Fail with error

Hi ,
I'm using "build.cake" to build my .net standard project.
I need to restore nuget packages before build start
Task
/**************************
Task("Restore")
.Does(() =>
{
if (dotnetCore=="true")
{
DotNetCoreRestore(project);
}
if (dotnetCore=="false")
{
NuGetRestore(solutionFile);
}
});

*****************************/

When I'm executing this build get fail with bellow error.

Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory

I'm not sure how to set this value.

Build script fail to capture exit code

Hi All
I have a following script that is running through bamboo agent

/*****************
echo "-------------------------Start Compilation ----------------------"
docker run --rm -v $PWD:$mountpoint -w $mountpoint docker.xxx.x.x.x/syncromatics/build-box:latest cake --dotnetCore="false" --setClean="true"
--package=${arr[0]} --workDir=${arr[1]}
--releaseName=${arr[2]}
echo "-------------------------End Compilation -------------------------"
echo " "
rc=$?
echo "ERRRRRRRRRRRRRRRRRRRRRRR" $rc
if [ $? -ne 0 ]
then

echo "An error occurred while compile time".
exit 1
fi
******************/
inside the build.cake it fails the build with exit code 1.

/************************
An error occurred when executing task 'Build'.
Error: One or more errors occurred.
MSBuild: Process returned an error (exit code 1).
***********************/

But I cant capture this error using $?. It always return 0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.