Browse Source

Add commands for docker install

01_04
Michael Jenkins 4 years ago
parent
commit
ccd609409e
1 changed files with 25 additions and 0 deletions
  1. +25
    -0
      01_04.md

+ 25
- 0
01_04.md View File

@ -0,0 +1,25 @@
# Learning Jenkins, 01-04: Install Jenkins as a Container
# Prerequisites
You will need to have [Docker](https://docs.docker.com/get-docker/) installed on your local system.
# Installation
In a terminal, run the following commands:
```
docker --version
docker pull jenkins/jenkins:lts
docker run --detach --publish 8080:8080 --volume jenkins_home:/var/jenkins_home --name jenkins jenkins/jenkins:lts
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
```
# Using the Initial Admin Password
Run the following command and copy the output:
```
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
```
Open a browser to [localhost:8080](http://localhost:8080) and enter the initial admin password.

Loading…
Cancel
Save