Skip to content

Commit

Permalink
Adding references about agent port configuration to README
Browse files Browse the repository at this point in the history
  • Loading branch information
hpedrorodrigues committed Mar 8, 2019
1 parent 053a916 commit 4262b4b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ NOTE: Avoid using a [bind mount](https://docs.docker.com/storage/bind-mounts/) f
docker run -d -v jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts
```

this will run Jenkins in detached mode with port forwarding and volume added. You can access logs with command 'docker logs CONTAINER_ID' in order to check first login token. ID of container will be returned from output of command above.
this will run Jenkins in detached mode with port forwarding and volume added. You can access logs with command 'docker logs CONTAINER_ID' in order to check first login token. ID of container will be returned from output of command above.

## Backing up data

Expand Down Expand Up @@ -106,7 +106,7 @@ If you want to install Jenkins behind a reverse proxy with prefix, example: mysi

# Passing Jenkins launcher parameters

Argument you pass to docker running the jenkins image are passed to jenkins launcher, so you can run for sample :
Argument you pass to docker running the jenkins image are passed to jenkins launcher, so you can run for sample:
```
docker run jenkins/jenkins:lts --version
```
Expand Down Expand Up @@ -136,6 +136,12 @@ or as a parameter to docker,
docker run --name myjenkins -p 8080:8080 -p 50001:50001 --env JENKINS_SLAVE_AGENT_PORT=50001 jenkins/jenkins:lts
```

**Note**: This environment variable will be used to set the port using the
[system property][system-property] `jenkins.model.Jenkins.slaveAgentPort` in **JAVA_OPTS**.

> If this property is already set in **JAVA_OPTS**, then the value of
`JENKINS_SLAVE_AGENT_PORT` will be ignored.

# Installing more tools

You can run your container as root - and install via apt-get, install as part of build steps via jenkins tool installers, or you can create your own Dockerfile to customise, for example:
Expand Down Expand Up @@ -272,3 +278,5 @@ If you wish to contribute fixes to this repository, please refer to the [dedicat
# Questions?

Jump on irc.freenode.net and the #jenkins room. Ask!

[system-property]: https://wiki.jenkins.io/display/JENKINS/Features+controlled+by+system+properties

0 comments on commit 4262b4b

Please sign in to comment.