# Docker

It is important to note that docker containers and unikernels are fairly differernt and are not at all the same thing. Most notably a docker container typically has a large userland that can run many different programs whereas a unikernel can only run one. Not only that but a unikernel is single process (however has support for multi-threading).

In practice this means that sometimes there are tweaks that need to happen for you to run something as a unikernel vs a container, these tend to come with substantial security and performance benefits.

Many applications can be imported from docker containers into unikernels quite easily as shown in:

<https://docs.ops.city/ops/packages#create-a-package-from-docker>

On can set the arguments for the package that is created from the docker export as they sometimes will differ from a Dockerfile.

For example to export a nextjs docker container to a unikernel package:

```
ops pkg from-docker njs2 --copy --file /usr/local/bin/node -a app/server.js
ops pkg load --local njs --nanos-version=3c1fb76
```


---

# 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/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.
