Skip to main content

Agent in Docker

You can run the Juice Agent as a container on your machine. Juice provides an official docker image for each release or you can build your own based on template.

Prerequisites

Running the official agent image:

The official agent is published to our Dockerhub, please follow the latest instructions there to get started.

Building a custom agent image:

The Dockerfile for our offical agent is available in our open source repository. You can checkout and customize the agent using the following steps:

  1. Open a terminal and clone the respository
git clone https://github.com/Juice-Labs/juice-oss.git
cd juice-oss/docker/agent
  1. Modify the Dockerfile at docker/agent/Dockerfile

  2. Build your custom image:

docker build -t juice-agent . 
  1. Once the image is built, you can run a container using your M2M token and pool id:
docker run --rm 
-p 7865:7865/udp \
-e JUICE_TOKEN=<YOUR_TOKEN> \
-e JUICE_POOL=<YOUR_POOL_ID> \
-e JUICE_HOST_IP=<YOUR_HOST_IP> \
-v ./logs:/home/juice/agent/log \
--restart unless-stopped \
juice-agent

For detailed information on these parameters and how you can use docker compose to run the agent please see the README