Skip to main content

Docker Executor

Beside using bare metal machine in Kraken CI jobs, it is possible to select a Docker executor. This can be made in the following way:

def stage(ctx):
return {
"parent": "root",
"triggers": {
"parent": True
},
"parameters": [],
"configs": [],
"jobs": [{
"name": "Docker job",
"steps": [{
"tool": "shell",
"cmd": "echo 'Hello World'"
}],
"environments": [{
"executor": "docker",
"system": "krakenci/ubuntu:20.04",
"agents_group": "any",
"config": "default"
}]
}]
}

In the jobs list, in the environments section there are present:

  • "executor": "docker", - this indicates that instead of bare metal machine a Docker container should be used to execute a job
  • "system": "krakenci/ubuntu:20.04", - this indicated that particular Docker image should be used, in this case this is Ubuntu:20.04 from krakenci user on Docker Hub.

Images

There are many images prepared for Kraken CI Docker executor. They are available on Docker Hub:

Language Images

There are many images prepared for various programming languages.

Their usage, based on Hello World examples, can be seen on Demo Lab of Kraken CI: https://lab.kraken.ci/branches/33/ci

LanguageDocker HubDockerfileImage
Clojurekrakenci/clojureDockerfileclojure:1.11
Crystalkrakenci/crystalDockerfilecrystal:1.4
Dartkrakenci/dartDockerfiledart:2.16
Elixirkrakenci/elixirDockerfileelixir:1.13
Erlangkrakenci/erlangDockerfileerlang:23.3
GNU C/C++krakenci/gccDockerfilegcc:11.3
Gokrakenci/golangDockerfilegolang:1.18
Groovykrakenci/groovyDockerfilegroovy:3.0
Haskellkrakenci/haskellDockerfilehaskell:9.2
Haxekrakenci/haxeDockerfilehaxe:4.2
Juliakrakenci/juliaDockerfilejulia:1.7
C# / Monokrakenci/monoDockerfilemono:6.12
Javascript / Nodekrakenci/nodeDockerfilenode:18.0
Java / OpenJDKkrakenci/openjdkDockerfileopenjdk:11.0
Perlkrakenci/perlDockerfileperl:5.34
Perl 6 / Rakudokrakenci/rakudoDockerfilerakudo:2021.04
PHPkrakenci/phpDockerfilephp:8.0
Pythonkrakenci/pythonDockerfilepython:3.8
Rubykrakenci/rubyDockerfileruby:3.1
Rustkrakenci/rustDockerfilerust:1.60
Swiftkrakenci/swiftDockerfileswift:5.6

System Images

SystemTags / VersionsDockerfileBase Image
Ubuntu 20.04krakenci/ubuntu:20.04Dockerfileubuntu:20.04
CentOS 8krakenci/centos:8Dockerfilecentos:8
Fedora 33krakenci/fedora:33Dockerfilefedora:32

Tested Vanilla Images

  • fedora:32
  • fedora:33
  • fedora:34
  • fedora:35
  • fedora:36
  • fedora:37
  • rockylinux:8
  • rockylinux:9
  • almalinux:8
  • almalinux:9
  • debian:buster
  • debian:bullseye
  • debian:bookworm
  • ubuntu:18.04
  • ubuntu:20.04
  • ubuntu:22.04

For details, please, check a testing workflow results: https://lab.kraken.ci/branches/12/ci