
## Package app with Docker

URL: https://docs.atlan.com/product/capabilities/build-apps/partner-with-us/how-tos/package-app-with-docker

> Build Docker images for your Atlan applications to create OCI-compliant containers for deployment within Atlan's runtime environment

Package your completed Atlan application as a Docker container to meet deployment requirements for Atlan's partner program. This creates the OCI-compliant container format required for app distribution through Atlan's ecosystem.

## Before you begin

Verify you have the following ready before packaging your application:

- Completed application development using the App Framework
- Docker installed on your development system
 - If you're using a Docker driver other than Docker Desktop (such as OrbStack or Colima), you need to create a builder first:
 - **OrbStack**: Follow [OrbStack's multi-platform build instructions](https://docs.orbstack.dev/docker/images#multi-platform-images)
 - **Colima**: Follow [Colima's buildx setup guide](https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#buildx)
- Your application includes a [Dockerfile](https://github.com/atlanhq/atlan-sample-apps/blob/main/Dockerfile) based on the `app-runtime-base` image provided with Atlan templates

## Build your Docker image

Build your application as a Docker container image. Atlan expects app developers to send multi-platform images when submitting apps for release to support compatibility across different hardware architectures.

1. Navigate to your application directory containing the Dockerfile.

2. Choose the appropriate build method based on your deployment needs:

### Multi-platform (Production)

Build a multi-platform image that supports both AMD64 and ARM64 architectures. Atlan requires multi-platform images when you submit apps for release to support compatibility across different deployment environments and hardware architectures used by Atlan customers.

 ```bash
 docker buildx build --no-cache --platform linux/amd64,linux/arm64 -t app-name:latest . --push
 ```

 - Replace `app-name` with a descriptive name for your application image.
 - The `--platform linux/amd64,linux/arm64` flag creates a manifest that includes both AMD64 (x86_64) and ARM64 (aarch64) architectures.
 - The `--push` flag automatically pushes the multi-platform manifest to your registry after building.

### Single-platform (Development)

Single-platform builds are faster and ideal for iterating on your code. Use this method to quickly build and test your application locally during development. 

 ```bash
 docker build --no-cache -f ./Dockerfile -t app-name:latest .
 ```

 - Replace `app-name` with a descriptive name for your application image.
 - This builds for your current system's architecture only (either AMD64 or ARM64).

## Test your containerized application

Verify your containerized application works correctly before submitting it for release. Run the container with the environment variables that point it at your local services.

1. Run your container with the required environment variables:

### Using local services

```bash
 docker run -p 8000:8000 \
 --add-host=host.docker.internal:host-gateway \
 -e ATLAN_WORKFLOW_HOST=host.docker.internal \
 -e ATLAN_WORKFLOW_PORT=7233 \
 --user 1000:1000 \
 app-name
 ```

### Using remote services

```bash
 docker run -p 8000:8000 \
 -e ATLAN_WORKFLOW_HOST=<your-host> \
 -e ATLAN_WORKFLOW_PORT=<your-port> \
 --user 1000:1000 \
 app-name
 ```

 Replace `<your-host>` and `<your-port>` with your service connection details.

2. Verify your application works by accessing `http://localhost:8000`

Your application is now packaged as an OCI-compliant container ready for deployment within Atlan's runtime environment. Collaborate with your Atlan partnership team to validate container compatibility and deployment requirements.

## Need help

If you encounter issues with registry authentication or image uploads, [submit a support request](https://docs.atlan.com/support/submit-request) or contact your Atlan partnership team.

## Next steps

After packaging your application, push your Docker images to Atlan's Harbor registry:

- [Push images to Harbor registry](https://docs.atlan.com/llms/platform/build-apps/push-images-to-harbor-registry/llms.txt)

---
