# Docker Support

A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.

Using **Visual Studio Docker Tools**, Wisej.NET 3 applications can be packaged and run in these containers.

## Project

### Installing

When creating a **cross-platform** Wisej.NET 3 application, Visual Studio will prompt the user to add Docker support to the project.

<div align="left"><img src="/files/KOlUE5yqDLHuWq3egu1A" alt="Wisej.NET 3 Project Wizard"></div>

### Running

To run the Wisej.NET application in a Docker container, change the runtime target to **Docker**.

<div align="left"><img src="/files/FkodJWOgOL6aolKqDvFI" alt="Docker runtime target"></div>

{% hint style="danger" %}
When building and running a **Docker** project, the **first TargetFramework** is always used. If Docker can't run the first TargetFramework, it will target the **second** or **third** listed framework.
{% endhint %}

{% embed url="<https://docs.microsoft.com/en-us/dotnet/architecture/containerized-lifecycle/design-develop-containerized-apps/visual-studio-tools-for-docker>" %}
Visual Studio Docker Tools
{% endembed %}

## Dockerfile

Docker can build images automatically by reading the instructions from a `Dockerfile`. A `Dockerfile` is a text document that contains all the commands a user could call on the command line to assemble an image. Using `docker build` users can create an automated build that executes several command-line instructions in succession.

Below is a sample Dockerfile configured to run a **Wisej.NET 3** application that targets **.NET 5**.

<div align="left"><img src="/files/kFJuHMY6BRZQzAINf2QM" alt=""></div>

{% hint style="warning" %}
Be sure to update the Dockerfile if the **TargetFramework** is not .**NET5.0**.
{% endhint %}

{% embed url="<https://docs.docker.com/engine/reference/builder#from>" %}


---

# 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.wisej.com/docs/releases/whats-new-in-3.0/docker-support.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.
