@@ -15,7 +15,7 @@ This is a fully functional Jenkins server.
...
@@ -15,7 +15,7 @@ This is a fully functional Jenkins server.
# Usage
# Usage
```
```
podman run -p 8080:8080 -p 50000:50000 nexus-docker-secure.nexus.svc.cluster.local:18082/opensource/jenkins/jenkins:2.235.1-development
podman run -p 8080:8080 -p 50000:50000 nexus-docker-secure.nexus.svc.cluster.local:18082/opensource/jenkins/jenkins:2.263.1-development
```
```
NOTE: read below the _build executors_ part for the role of the `50000` port mapping.
NOTE: read below the _build executors_ part for the role of the `50000` port mapping.
...
@@ -24,7 +24,7 @@ This will store the workspace in /var/jenkins_home. All Jenkins data lives in th
...
@@ -24,7 +24,7 @@ This will store the workspace in /var/jenkins_home. All Jenkins data lives in th
You will probably want to make that an explicit volume so you can manage it and attach to another container for upgrades :
You will probably want to make that an explicit volume so you can manage it and attach to another container for upgrades :
```
```
podman run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home nexus-docker-secure.nexus.svc.cluster.local:18082/opensource/jenkins/jenkins:2.235.1-development
podman run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home nexus-docker-secure.nexus.svc.cluster.local:18082/opensource/jenkins/jenkins:2.263.1-development
```
```
this will automatically create a 'jenkins_home' [docker volume](https://docs.docker.com/storage/volumes/) on the host machine, that will survive the container stop/restart/deletion.
this will automatically create a 'jenkins_home' [docker volume](https://docs.docker.com/storage/volumes/) on the host machine, that will survive the container stop/restart/deletion.
...
@@ -32,7 +32,7 @@ this will automatically create a 'jenkins_home' [docker volume](https://docs.doc
...
@@ -32,7 +32,7 @@ this will automatically create a 'jenkins_home' [docker volume](https://docs.doc
NOTE: Avoid using a [bind mount](https://docs.docker.com/storage/bind-mounts/) from a folder on the host machine into `/var/jenkins_home`, as this might result in file permission issues (the user used inside the container might not have rights to the folder on the host machine). If you _really_ need to bind mount jenkins_home, ensure that the directory on the host is accessible by the jenkins user inside the container (jenkins user - uid 1000) or use `-u some_other_user` parameter with `podman run`.
NOTE: Avoid using a [bind mount](https://docs.docker.com/storage/bind-mounts/) from a folder on the host machine into `/var/jenkins_home`, as this might result in file permission issues (the user used inside the container might not have rights to the folder on the host machine). If you _really_ need to bind mount jenkins_home, ensure that the directory on the host is accessible by the jenkins user inside the container (jenkins user - uid 1000) or use `-u some_other_user` parameter with `podman run`.
```
```
podman run -d -v jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 nexus-docker-secure.nexus.svc.cluster.local:18082/opensource/jenkins/jenkins:2.235.1-development
podman run -d -v jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 nexus-docker-secure.nexus.svc.cluster.local:18082/opensource/jenkins/jenkins:2.263.1-development
```
```
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.
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:
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:
```
```
FROM nexus-docker-secure.nexus.svc.cluster.local:18082/opensource/jenkins/jenkins:2.235.1-development
FROM nexus-docker-secure.nexus.svc.cluster.local:18082/opensource/jenkins/jenkins:2.263.1-development
# if we want to install via apt
# if we want to install via apt
USER root
USER root
RUN apt-get update && apt-get install -y ruby make more-thing-here
RUN apt-get update && apt-get install -y ruby make more-thing-here
...
@@ -160,7 +160,7 @@ For this purpose, use `/usr/share/jenkins/ref` as a place to define the default
...
@@ -160,7 +160,7 @@ For this purpose, use `/usr/share/jenkins/ref` as a place to define the default
wish the target installation to look like :
wish the target installation to look like :
```
```
FROM nexus-docker-secure.nexus.svc.cluster.local:18082/opensource/jenkins/jenkins:2.235.1-development
FROM nexus-docker-secure.nexus.svc.cluster.local:18082/opensource/jenkins/jenkins:2.263.1-development
This center offers Alpha and Beta versions of plugins.
This center offers Alpha and Beta versions of plugins.
...
@@ -198,7 +198,7 @@ Dependencies that are already included in the Jenkins war will only be downloade
...
@@ -198,7 +198,7 @@ Dependencies that are already included in the Jenkins war will only be downloade
There are also custom version specifiers:
There are also custom version specifiers:
*`latest` - download the latest version from the main update center.
*`latest` - download the latest version from the main update center.
For Jenkins 2.235.1 images
For Jenkins 2.263.1 images
(example: `git:latest`)
(example: `git:latest`)
*`experimental` - download the latest version from the experimental update center defined by the `JENKINS_UC_EXPERIMENTAL` environment variable (example: `filesystem_scm:experimental`)
*`experimental` - download the latest version from the experimental update center defined by the `JENKINS_UC_EXPERIMENTAL` environment variable (example: `filesystem_scm:experimental`)
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
```
```
...
@@ -277,7 +277,7 @@ which may be inappropriate.
...
@@ -277,7 +277,7 @@ which may be inappropriate.
# Upgrading
# Upgrading
All the data needed is in the /var/jenkins_home directory - so depending on how you manage that - depends on how you upgrade. Generally - you can copy it out - and then "docker pull" the image again - and you will have the latest 2.235.1 - you can then start up with -v pointing to that data (/var/jenkins_home) and everything will be as you left it.
All the data needed is in the /var/jenkins_home directory - so depending on how you manage that - depends on how you upgrade. Generally - you can copy it out - and then "docker pull" the image again - and you will have the latest 2.263.1 - you can then start up with -v pointing to that data (/var/jenkins_home) and everything will be as you left it.
As always - please ensure that you know how to drive docker - especially volume handling!
As always - please ensure that you know how to drive docker - especially volume handling!