# Migrate from Docker

This part explains how to migrate applications from native Docker to the Clawcloud Run platform.

Clawcloud Run offers features such as instant deployment, deep CI/CD integration, private networks, observability, and elastic scaling, allowing developers to focus on implementing business logic without worrying about the underlying infrastructure. Thanks to the user-friendly experience provided by the Clawcloud Run platform, developers can more easily migrate, deploy, and manage applications.

This part uses Alist as an example to demonstrate how to migrate applications from native Docker to the Clawcloud Run platform.

<figure><img src="https://2509840198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrViHKCGxzpwUEsRBfwlN%2Fuploads%2F0JMgLD1d9X5dQVogPMKm%2Fimage.png?alt=media&#x26;token=cfc0d725-f25f-4682-9f32-7fe4cca77d89" alt=""><figcaption><p>Alist</p></figcaption></figure>

#### Background Information

The Docker deployment command is as follows:

{% code overflow="wrap" %}

```sh
docker run -d --restart=unless-stopped -v /etc/alist:/opt/alist/data -p 5244:5244 -e PUID=0 -e PGID=0 -e UMASK=022 --name="alist" xhofe/alist:latest
```

{% endcode %}

primarily involving the following parameters:

* -v: bind mount a volume;
* -p: publish a container's port(s) to the host;
* -e: set environment variables.

Next, we will demonstrate how to deploy an identical application on the Clawcloud Run platform using the same image and configuration parameters.

#### Deployment Steps

Log in to the Clawcloud Run console, navigate to the App Launchpad application, and click on "Create APP".

<figure><img src="https://2509840198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrViHKCGxzpwUEsRBfwlN%2Fuploads%2F60FF69KMCFnqtpW930J6%2Fimage.png?alt=media&#x26;token=82970cd8-67b8-4bb9-8500-44dec5ce2979" alt=""><figcaption><p>Clawcloud Run Console</p></figcaption></figure>

<figure><img src="https://2509840198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrViHKCGxzpwUEsRBfwlN%2Fuploads%2FIbondwybDuNCqA5wNBlr%2Fimage.png?alt=media&#x26;token=2c4b1eb1-064c-4700-8b13-61436660daf8" alt=""><figcaption><p>App Launchpad</p></figcaption></figure>

On the Application Deployment page, fill in the application parameters as specified in the table below:

| Application Parameter | Parameter Value      | Description                    |
| --------------------- | -------------------- | ------------------------------ |
| Application Name      | alist                | Custom Application Name        |
| Image Type            | Public               | Public or Private              |
| Image Name            | `xhofe/alist:latest` | \<User-name>/\<Image-name>:tag |
| Usage Type            | Fixed                | Fixed or Scaling               |
| Replicas              | 1                    | Set according to actual needs  |
| CPU                   | 0.2 Core             | Set according to actual needs  |
| Memory                | 256 M                | Set according to actual needs  |

Next, configure the application parameters corresponding to the -p, -e, and -v options in the docker run command.

| Docker Parameters                  | Application Parameter                          | Parameter Value                            |
| ---------------------------------- | ---------------------------------------------- | ------------------------------------------ |
| `-p 5244:5244`                     | Network - Container Port                       | 5244                                       |
| `-e PUID=0 -e PGID=0 -e UMASK=022` | Advanced Configuration - Environment Variables | <p>PUID=0</p><p>PGID=0</p><p>UMASK=022</p> |
| `-v /etc/alist:/opt/alist/data`    | Advanced Configuration - Local Storage         | /opt/alist/data                            |

Finally, click "Deploy Application" to deploy the application.

<figure><img src="https://2509840198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrViHKCGxzpwUEsRBfwlN%2Fuploads%2FJeNT4csLPgAa3187LC1S%2Fimage.png?alt=media&#x26;token=1ca30b87-0d5b-45ad-b9da-54f0a7d0c1cd" alt=""><figcaption><p>Deploy Application</p></figcaption></figure>

You can now access the application via the Public Address provided by the Clawcloud Run platform, which guarantees secure HTTPS access using our platform's built-in certificate.

<figure><img src="https://2509840198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrViHKCGxzpwUEsRBfwlN%2Fuploads%2FlELAmROs5IwSXtHW9gGJ%2Fimage.png?alt=media&#x26;token=a4056e71-b7a9-4358-ae17-1595802ee9ac" alt=""><figcaption><p>Public Address</p></figcaption></figure>

You can also use a custom domain to access the application. To set up a custom domain, please add a CNAME record for your domain pointing to the public address at your domain registrar. You can bind your custom domain once the DNS resolution takes effect.

<figure><img src="https://2509840198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrViHKCGxzpwUEsRBfwlN%2Fuploads%2FyPmC8Z365nQfilO7e4r7%2Fimage.png?alt=media&#x26;token=629acaf2-62f7-4f3b-8345-d7612196187e" alt=""><figcaption><p>Custom Domain</p></figcaption></figure>
