Jenkins minimal docker container with Jenkins alpine, git, docker, .NET SDK 6.0
Sample Jenkinsfile to get started with .NET, Java, Elixir - todo
docker build -t haighis/jenkins-alpine .
docker tag haighis/jenkins-alpine haighis/jenkins-alpine:0.5.0
docker run -p 8888:8080 -it --name jenkins -v "/var/run/docker.sock:/var/run/docker.sock:rw" haighis/jenkins-alpine:0.6.0
docker run -p 9999:8080 -it -v "/var/run/docker.sock:/var/run/docker.sock:rw" haighis/jenkins-alpine-new
This will allow for creating all jobs from a groovy script in a seed job. Saves time and allows you to restore jobs when configuration is incorrect.
- Go to New Item
- Name it SeedJob and choose Freestyle project and go to Ok
- Add Build Step Process Job DSLs
- Select use provided DSL script, paste in groovy script from
JOB_DSL
and Save - Go to Manage Jenkins and go to In-Process script approval to approve the new groovy script
- Go back to Build Now on Jenkins SeedJob.
Once SeedJob builds all default jobs are now present.
- Add credentials for docker hub account called DOCKER_CREDENTIALS. Enter your username and password
- For Jenkins Aline job add a parameter called DOCKER_TAG that is used with this build to define the docker tag
http://localhost:8888
Default user is admin
with password admin