> ## Overview

> Overview of how to set up your software for testing with Antithesis using Docker Compose or Kubernetes.

> Fetch the complete documentation index at: https://antithesis.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---

Antithesis runs your software as Linux container images in a hermetic simulation environment — meaning **no internet access** at all. Anything your system needs must either be packaged into the environment or mocked appropriately.

If you're working with an AI agent, use the `antithesis-setup` or `antithesis-setup-k8s` [skills](https://antithesis.com/docs/ai/skills/#set-your-system-up-to-test-in-antithesis) to help package your system. Otherwise, refer to the [Containerize your software](/docs/setup/overview/#containerize-your-software) and [Containerize your dependencies](/docs/setup/overview/#containerize-your-dependencies) sections below.

Once you've done this, you're ready to follow one of our setup guides to orchestrate your containers to run in Antithesis, and upload your software to the Antithesis registry.

We support [Docker Compose](https://docs.docker.com/compose/) and [Kubernetes](https://kubernetes.io/docs/home/) for container orchestration. Pick the right guide for your system:

- [Docker Compose setup guide](/docs/setup/docker_compose/)
- [Kubernetes setup guide](/docs/setup/kubernetes/)

## Requirements

1. Make sure you have a container registry and credentials -- or [contact us](/docs/faq/poc_faq/) to request them.

2. It's helpful to have some understanding of:
   - [Docker](https://docs.docker.com)
   - Your software's dependencies

## Containerize your software

You'll need to compile your software to run on x86-64 CPUs.

If your services perform network calls to the public on startup — such as a software dependency or data file — you should move this into the container build process instead, as your software will be running without access to the internet.

For example, DON'T do this:

```docker
FROM docker.io/ubuntu:24.04
COPY src/my_app /opt/my_app
CMD curl --fail https://example.com/data > /opt/data && /opt/my_app /opt/data
```

This `curl` command runs when the container starts, and will fail.

DO this instead:

```docker
FROM docker.io/ubuntu:24.04
COPY src/my_app /opt/my_app
RUN curl --fail https://example.com/data > /opt/data
CMD /opt/my_app /opt/data
```

This `curl` command runs during the build step, when internet access is still available, so the data is already available when the container starts.

### Example

If this is your first time containerizing software, here's a basic example to get you started.

Create a [Dockerfile](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) in the root directory of your project to containerize it. Your structure might look like this:

```shell
my_project/
  src/
    my_app/
    ..
  Dockerfile
```

Build a Docker image for your software, compiled for x86-64 CPUs. Be sure to replace `<image-name>` and `<tag-name>` appropriately.

```shell
$ docker build --platform linux/amd64 . -t <image-name>:<tag-name>
```

> **Note**

## Containerize your dependencies

Since there's no internet access inside the Antithesis environment, all of your software's dependencies need to be deployed alongside it.

There are two ways to do this:

1. Deploy the actual service, just as you would in production.
2. Upload a mock of the service.

### Deploy the actual service

If the dependency is something you control, e.g. a local database node, follow [the previous step](#containerize-your-software) to build a container image. You'll upload it to the Antithesis registry along with your software.

For third-party services, many open-source tools (like Redis, Kafka, MongoDB, MySQL, etc.) are already hosted on public registries such as [Docker Hub](https://hub.docker.com/) or [Quay](https://quay.io/). If so, you can simply specify the registry and image when setting up [orchestration](#set-up-container-orchestration).

### Upload a mock

If a third-party dependency doesn't offer a public container image, you'll need a mock of the service. Many companies provide mocks in containerized form (e.g. Stripe provides [Stripe-mock](https://github.com/stripe/stripe-mock)), and third-party providers, e.g. [Localstack](https://www.localstack.cloud/), provide sophisticated pre-built mocks of common dependencies like AWS. Treat these like any other open-source, containerized dependency and specify the registry and image when setting up [orchestration](#set-up-container-orchestration).

[Handling external dependencies](/docs/reference/dependencies/) offers more details, and a list of commonly used mocks.
