> For the complete documentation index, see [llms.txt](https://docs.prismacloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prismacloud.io/admin-guide/continuous-integration/run-jenkins-container.md).

# Run Jenkins in a container

Running Jenkins inside a container is a common setup. This article shows you how to set up Jenkins to run in a container so that it can build and scan Docker images.

## Setting up and starting a Jenkins container

To set up Jenkins to run in a container:

**Prerequisite:** You have already installed Docker on the host machine.

1. Create the following Dockerfile. It uses the base Jenkins image and sets up the required permissions for the jenkins user.

   ```
   FROM jenkins/jenkins:lts

   USER root
   RUN apt-get update \
         && apt-get install -y sudo libltdl7 \
         && rm -rf /var/lib/apt/lists/*
   RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers
   ```
2. Build the image.

   ```
   $ docker build -t jenkins_docker .
   ```
3. Run the Jenkins container, giving it access to the docker socket.

   ```
   $ docker run -d -v /var/run/docker.sock:/var/run/docker.sock \
     -v $(which docker):/usr/bin/docker -p 8080:8080 jenkins_docker
   ```
4. Open a browser and navigate to \<JENKINS\_HOST>:8080.
5. Install the Prisma Cloud plugin.

   For more information, see [Jenkins plugin](/admin-guide/continuous-integration/jenkins-plugin.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.prismacloud.io/admin-guide/continuous-integration/run-jenkins-container.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
