Overview
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 to help package your system. Otherwise, refer to the Containerize your software and 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 and Kubernetes for container orchestration. Pick the right guide for your system:
Requirements
-
Make sure you have a container registry and credentials — or contact us to request them.
-
It’s helpful to have some understanding of:
- Docker
- 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:
FROM docker.io/ubuntu:24.04COPY src/my_app /opt/my_appCMD curl --fail https://example.com/data > /opt/data && /opt/my_app /opt/dataThis curl command runs when the container starts, and will fail.
DO this instead:
FROM docker.io/ubuntu:24.04COPY src/my_app /opt/my_appRUN curl --fail https://example.com/data > /opt/dataCMD /opt/my_app /opt/dataThis 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 in the root directory of your project to containerize it. Your structure might look like this:
my_project/ src/ my_app/ .. DockerfileBuild a Docker image for your software, compiled for x86-64 CPUs. Be sure to replace <image-name> and <tag-name> appropriately.
$ docker build --platform linux/amd64 . -t <image-name>:<tag-name>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:
- Deploy the actual service, just as you would in production.
- 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 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 or Quay. If so, you can simply specify the registry and image when setting up 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), and third-party providers, e.g. Localstack, 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.
Handling external dependencies offers more details, and a list of commonly used mocks.