Skip to content


Example using an existing docker container hosted on docker (croc)

To run croc locally in docker we can run:

docker run -d -p 9009-9013:9009-9013 -e CROC_PASS='YOURPASSWORD' schollz/croc
croc --pass YOURPASSWORD --relay "localhost:9009" send file.txt

To do the same in azure we need to do the following:

First, login to azure and use the correct subscription:

az login
az account set --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Now, if not available, we need to create a container registry:

TODO: Create container registry

Now we need add the desired existing docker container to our container registry

az acr login --name fab1container --expose-token
docker login
az acr update -n fab1container --admin-enabled true

docker pull schollz/croc
docker push schollz/croc
docker tag schollz/croc

az acr repository list --name fab1container --output table

This container within the container registry can then be linked with a container instance.

TODO: Create container instance

Now we run the container instance using the desired

docker run -d -p 9009-9013:9009-9013 -e CROC_PASS='long-awesome-password'

The setup is complete and we should be able to use croc.

Example on how to use croc with the azure hosted relay:

I added a CNAME entry (croc) to my DNS entry and added the alias: so that i can call the service @

croc --relay "" send geohashing.png