Skip to content

Easily run Jenkins Blue Ocean using this docker-compose file

Notifications You must be signed in to change notification settings

kzap/jenkins-blue-ocean-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Composer Setup

How to easily get Jenkins with the Blue Ocean UI up and running on your computer using docker and docker-compose

How to use:

  1. In your directory, copy .env.sample to .env and customize as needed. In particular, change JENKINS_HTTP_PORT and JENKINS_HTTPS_PORT to a high port (e.g. 18443) on Minikube.

  2. Run docker-compose to bring up Jenkins

$ docker-compose up -d
  1. Get your initial admin password
$ docker-compose exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
  1. Open Jenkins in your browser by going to either https://0.0.0.0:8080/ or https://0.0.0.0:8443/ (or whatever your Docker Machine IP is).

  2. Enter your initial admin password when the setup wizard asks you to.

Start the setup wizard by entering the intial admin password

  1. Choose Install suggested plugins

Jenkins Install Options

Jenkins is Installing

  1. Enter your admin user details and click Save and Finish

Jenkins Admin User Setup

  1. Click Open Blue Ocean from the left hand menu

Blue Ocean

Congratulations! You may now use Jenkins with the Blue Ocean UI and the Jenkins Pipelines of 2.0

Troubleshooting

Mounted volumes are empty

This guide is for:

  • Windows users that did not meet the system requirements of Docker for Windows (You may check out the system requirements here)
  • Uses Docker Toolbox
  • Uses Virtualbox for virtualization

Note: We will assume that your current working directory is at D:\Projects\Jenkins Note: All commands are executed inside the Docker Quickstart Terminal

  1. In your virtual machine, create a shared folder that has access to your working directory You may share D:\Projects instead of D:\Projects\Jenkins. Everything under D:\Projects will be accessible in the vm.

    • Open Virtualbox
    • Open the vm's settings
      • Your vm's name is probably default
      • You can see which machine is currently active by running docker-machine ls The active machine should have an asterisk (*) on the ACTIVE column.
    • Under Shared Folders add a new entry
      • If folder path is D:\Projects, folder name should be d/Projects
      • Tick Auto-mount
      • Tick Make Permanent

vm settings

sometimes, Make Permanent won't be an option. Don't bother looking for that if so, it'll still be fine. Auto-mount is what we want.

  1. If your vm is running, Restart your vm by executing docker-machine restart If your vm is stopped, you are either not executing these inside the quickstart terminal or you need to execute docker-machine start <vm-name-here>

  2. Verify the shared folder by logging in to the vm

    • run docker-machine ssh
    • run ls /d/Projects

Now your containers should have access to your current folder.

NOTES

  • When setting up the Folder Name in the VM settings, assure that it's a valid linux path and must be relative to / (root) directory (eg e/projects).
  • The directory that contains jenkins must not contain any whitespaces or any characters that must be escaped. (e.g F19 Source Code, Source\ Code) The reason is that it'll serve as a Folder Name in your VM settings, and you cannot click OK when you do supply such names.

Releases

No releases published

Packages

No packages published