> ## Documentation Index
> Fetch the complete documentation index at: https://help.cryptolens.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Containerized environments

> Explains how to license applications running in containerized environments (for example, Docker).

## Idea

Most of the licensing models can be applied to applications running in a containerized environments such as Docker. If you would like to enforce a restriction on the number of instances that can run the application, we recommend to choose the [floating model](https://help.cryptolens.io/licensing-models/floating) and set the **MachineCode** to a random value (computed whenever the application starts) when calling Key.Activate. The random value should be stored temporarily inside the application and never saved to disk.

This is done since containers can easily be copied and moved across different machines, making it difficult to identify individual containers.

<Note>
  **Note:** When clients do not have internet access, our [license server](https://github.com/Cryptolens/license-server#floating-licenses-offline) can be used instead.
</Note>

## Implementation

An quick way to obtain a random identifier is to use the GUID. A method to obtain it is available in most languages. We have summarized several examples below:

<CodeGroup>
  ```c# C# theme={null}
  var machineCode = Guid.NewGuid();
  ```

  ```python Python theme={null}
  import uuid
  machine_code = uuid.uuid4().hex
  ```
</CodeGroup>
