# Bare Metal

Ops can run on bare metal (eg: linux on real hardware) just fine.

## Pre-requisites

## Image Operations

### Build Image

```bash
$ ops build -e PORT=8080 -c config.json mylilwebserver -i mynewimg
```

### List Images

You can list existing images on bare metal with `ops image list`.

```bash
$ ops image list -t onprem
+--------------------+--------+-------------------------------+
|        NAME        | STATUS |            CREATED            |
+--------------------+--------+-------------------------------+
| nanos-main-image   | READY  | 2019-03-21T15:06:17.567-07:00 |
+--------------------+--------+-------------------------------+
| nanos-node-image   | READY  | 2019-04-16T23:16:03.145-07:00 |
+--------------------+--------+-------------------------------+
| nanos-server-image | READY  | 2019-03-21T15:50:04.456-07:00 |
+--------------------+--------+-------------------------------+
```

### Delete Image

## Instance Operations

### Create Instance

```bash
ops instance create <image_name> -t onprem -z onprem -p 8080
```

### List Instances

```bash
ops instance list -t onprem -z onprem
```

## Get Logs for Instance

### Delete Instance

For the time being pids are used as instance ids. Perhaps this will change in the future if more people opt to use this and they need stronger prevention of data leakage.

```
ops instance delete 53502 -t onprem -z onprem
```


---

# 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://docs.ops.city/ops/hypervisors/bare_metal.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.
