You should have Docker properly installed on your machine. Check Docker installation guide for details.

First, pull the official jenkins image from Docker repository.

docker pull jenkins

Next, run a container using this image and map data directory from the container to the host; e.g in the example below /var/jenkins_home from the container is mapped to jenkins/ directory from the current path on the host. Jenkins 8080 port is also exposed to the host as 49001.

docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home:z -t jenkins

Addtionally, you can configure nginx as a reverse proxy to your Jenkins instance, e.g.

upstream app {
server {
    listen 80;

    location / {
        proxy_pass http://app;