# Docker

### Pulling an image on Docker:

On your host box, run the command.

```
sudo docker pull centos:latest
```

### To see all the Docker images installed, issue the command:

```
sudo docker images
```

### To start the docker pulled CentOS, we need to issue a command to the OS to get a thread started. We can do this by running the following command:

```
sudo docker run -it centos /bin/bash
```

The above command does the following things −

* Runs the CentOS Docker image.
* Runs the image in interactive mode by using the **-it** option.
* Runs the **/bin/bash** command as the initial process.

## **Docker Example Building and Usage:**

### Clone this repository

```
git clone https://github.com/BeetleChunks/SpoolSploit
```

### Build the SpoolSploit Docker container image

```
cd SpoolSploit
sudo docker build -t spoolsploit .
```

### Create and start the SpoolSploit Docker container

```
sudo docker run -dit -p 445:445 --name spoolsploit spoolsploit:latest
```

### Attach to the container

```
sudo docker exec -it spoolsploit /bin/bash
```

### Docker Compose

```
$ cd <project directory>

$ docker compose up -d
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.smhuda.com/pentesting/tool-usage/docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
