> For the complete documentation index, see [llms.txt](https://docs.instruqt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.instruqt.com/sandboxes/hosts/custom-container-images.md).

# Custom container images

## Background

Before creating your custom Docker image, ensure that the image you need is not already available on the [Docker Hub](https://hub.docker.com/). Read the [Docker documentation](https://docs.docker.com/get-started/introduction/build-and-push-first-image/) to build your own Docker image.

## Create images

You have two options for host container images:

* Host publicly on Docker Hub
* Host privately in a Google Cloud Artifact Registry (see steps below)

### Docker Hub

Host publicly on Docker Hub. When using public Docker hub there is not any required integration or security changes required to run containers within your Instruqt sandbox.

1. Within your track sandbox configuration select add host\
   ![](/files/BFRpT7UZ8aPI0PJJg6y7)
2. Provide your hostname and container name. For example public docker hub container "busybox" would just require "busybox" to be put in for the container image name. If you have your own namespace you would prefix the name of your repository with that namespace (ie. namespace/repository)\
   ![](/files/48rhbouGV7ap7HLMkZCD)
3. Click save to add the host to the sandbox

### Google Cloud Artifact Registry

Host privately in a Google Cloud Artifact Registry (see steps below)

{% hint style="warning" %}
Instruqt only supports Linux *x86/amd64* based images. If you are using an Apple Silicon Macbook, use the `--platform=linux/amd64` flag for `docker build command.`
{% endhint %}

If you opt for private images, you need to authorize Instruqt's service accounts access to your repository. You can do so by granting the role `roles/storage.objectViewer` on the backing storage and `roles/artifactregistry.reader` role to the following Instruqt service accounts:

* `serviceAccount:instruqt-participants-nodepool@instruqt-prod.iam.gserviceaccount.com`
* `serviceAccount:instruqt-backend@instruqt-prod.iam.gserviceaccount.com`
