# Extending the NetBeez nb-agent Docker Image to Install Utilities

**URL:** <https://community.netbeez.net/t/extending-the-netbeez-nb-agent-docker-image-to-install-utilities/121>\
**Category:** Deploy & Configure\
**Created:** [October 27, 2023, 7:15pm UTC](https://community.netbeez.net/t/extending-the-netbeez-nb-agent-docker-image-to-install-utilities/121 "2023-10-27T19:15:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff.josephs](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.netbeez.net/jeff.josephs/32/19_2.png) [@jeff.josephs](https://community.netbeez.net/u/jeff.josephs)\
**Post date:** [October 27, 2023, 7:15pm UTC](https://community.netbeez.net/t/extending-the-netbeez-nb-agent-docker-image-to-install-utilities/121/1 "2023-10-27T19:15:44Z")

</div>

**Introduction:**  
In this tutorial, we will walk you through the steps to install utilities, in this case tcpdump, by extending the NetBeez nb-agent Docker image via a Dockerfile.

**Step 1: Pull the NetBeez nb-agent Docker Image**  
First, pull the NetBeez nb-agent Docker image from Docker Hub using the following command:  
`docker pull netbeez/nb-agent:latest`

**Step 2: Create a Dockerfile**  
Create a Dockerfile in your working directory. You can use any text editor to do this. For example, using nano:  
`nano Dockerfile`

Then, add the following content to your Dockerfile:

```auto
# Use the official NetBeez nb-agent image as the base image
FROM netbeez/nb-agent:latest

# Update and install tcpdump extended
RUN apt-get update && apt-get install -y tcpdump

```

Save the Dockerfile and exit the text editor.

**Step 3: Build your Customized nb-agent Image**  
Now, you can build your customized nb-agent image using the Dockerfile you just created. Use the following command:  
`docker build -t my-nb-agent .`

You can replace _my-nb-agent_ with your desired image name.

**Step 4: Run the Extended nb-agent Container**  
Now that you have created your customized nb-agent image with tcpdump extended, you can run a container from it:  
`docker run -d --name my-nb-agent-container my-nb-agent`

Replace _my-nb-agent-container_ with your desired container name. Additionally, see our [Docker agent documentation](https://hub.docker.com/r/netbeez/nb-agent) in order to get the container connected to your dashboard.

**Conclusion:**  
Now that you have successfully extended the NetBeez nb-agent Docker image with tcpdump. You can now capture and analyze network traffic using this extended container. You can access the container with the command `docker exec -it my-nb-agent-container /bin/bash` and then run the tcpdump command from there.

You can use these steps to install other APT based utilities, as well add other configurations by using Dockerfile to extend the NetBeez nb-agent image.
