Lab 2: Run workshop components with Docker
This guide shows you how to run a demo backend application and multiple NGINX OSS and Plus containers with Docker. The backend application runs in three nginxinc/ingress-demo containers, each serving a simple web page. You’ll also link each NGINX container to NGINX One Console for management and monitoring.
By the end of this tutorial, you’ll know how to:
- Set up environment variables for your data plane key and license
- Log in to the NGINX private registry
- Generate self-signed certificates
- Run Docker Compose to start 9 containers
- Verify your containers in Docker and in NGINX One Console
Make sure you have:
- An F5 Distributed Cloud (XC) account
- NGINX One service enabled in your XC account
- Docker and Docker Compose installed and running
- An active data plane key from Lab 1: Get started with NGINX One Console
- A trial or paid NGINX Plus JWT license (saved as
nginx-repo.jwt) from MyF5. - Basic Linux and NGINX know-how
- Git installed and SSH key set up for GitHub access
-
Clone the repo via SSH
git clone git@github.com:nginx/documentation.git -
Change to the Lab 2 directory
cd static/workshops/nginx-one/lab2
This folder contains docker-compose.yml and generate_certs.sh.
-
Set your data plane key
export TOKEN="paste-your-data-plane-key-here" echo "$TOKEN" -
Set your NGINX Plus JWT
export JWT=$(cat path/to/nginx-repo.jwt) echo "$JWT" -
Give your setup a unique name
Replace
your.initialswith something that identifies you or your setup (for example,s.jobs)export NAME="your.initials" echo "$NAME"
Pipe your JWT into Docker login:
echo "$JWT" | docker login private-registry.nginx.com \
--username "$JWT" --password-stdinYou should see Login Succeeded.
Run the script to create self-signed certs:
chmod +x generate_certs.sh
./generate_certs.shThis creates 1-day.key, 1-day.crt, 30-day.key, and 30-day.crt in the nginx-oss/etc/ssl/nginx subfolder.
Start all nine containers in detached mode:
docker compose up --force-recreate -dWait until you see “Started” for each container.
-
Check Docker
docker ps | grep "$NAME"You should see 9 containers listed.
-
Check NGINX One Console
- Go to the Instances page in the NGINX One Console
- Refresh and search by your
$NAME(for example,s.jobs) - Confirm each instance shows a green *Online icon.
If you don’t see them, double-check your $TOKEN or generate a new data plane key.
Now that your containers are up and registered, go on to explore NGINX One Console features in Lab 3.
Go to Lab 3: Explore NGINX One Console features