# Build Image

Lets build and run a simple image. First we create a `Dockerfile` file that will serve as a definition of our image. We are using [hello-world](https://github.com/docker-library/hello-world) image as our base image.

```
FROM hello-world

MAINTAINER Ondrej Kvasnovsky <ondrej.kvasnovsky@gmail.com>
```

Now we can build the image.

```
docker build -f Dockerfile -t demo/hello-world .
```

We must be able to see the new image in the list of available images.

```
➜  demo docker images
REPOSITORY                                           TAG                   IMAGE ID            CREATED             SIZE
demo/hello-world                                     latest                095848a4f47f        3 minutes ago       1.85kB
```

Once the image is available, we can run the image and that way, create a container. A container is a running instance of an image.

```
➜ demo docker run demo/hello-world

Hello from Docker!
...
```


---

# 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://ondrej-kvasnovsky-2.gitbook.io/docker-handbook/build-image.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.
