Skip to content

Commit dbbe8b1

Browse files
committed
docs: add docker steps
1 parent 9e26fbc commit dbbe8b1

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

content/nginx-one/agent/configure-instance-reporting/connect-using-squid.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,26 @@ TBD
4343

4444
### In a containerized environment
4545

46-
To configure NGINX Agent in a containerized environment, you can set the proxy
47-
URL and timeout value as environments variables:
46+
To configure NGINX Agent in a containerized environment:
4847

49-
```bash
48+
1. Configure the following environment variables for the docker command:
49+
50+
```sh
5051
NGINX_AGENT_COMMAND_SERVER_PROXY_URL=http://proxy.example.com:3128
5152
NGINX_AGENT_COMMAND_SERVER_PROXY_TIMEOUT=10
5253
```
5354

55+
1. Run the NGINX Agent container with the environment variables set:
56+
57+
```sh
58+
docker run -d \
59+
--name nginx-agent \
60+
-e NGINX_AGENT_COMMAND_SERVER_PROXY_URL=http://proxy.example.com:3128
61+
-e NGINX_AGENT_COMMAND_SERVER_PROXY_TIMEOUT=10
62+
nginx/nginx-agent:latest
63+
```
64+
65+
5466
## NGINX Agent proxy authentication
5567

5668
If your Squid proxy requires authentication, you can specify the username and password in the `proxy` section of the `agent.conf` file:
@@ -75,15 +87,30 @@ If your Squid proxy requires authentication, you can specify the username and pa
7587

7688
### In a containerized environment
7789

78-
To set proxy authentication in a containerized environment, you can use the following environment variables:
90+
To set proxy authentication in a containerized environment:
7991

80-
```bash
92+
1. Configure the following environment variables for the docker command:
93+
94+
```sh
8195
NGINX_AGENT_COMMAND_SERVER_PROXY_URL=http://proxy.example.com:3128
8296
NGINX_AGENT_COMMAND_SERVER_PROXY_AUTH_METHOD=basic
8397
NGINX_AGENT_COMMAND_SERVER_PROXY_USERNAME="user"
8498
NGINX_AGENT_COMMAND_SERVER_PROXY_PASSWORD="pass"
8599
```
86100

101+
1. Run the NGINX Agent container with the environment variables set:
102+
103+
```sh
104+
docker run -d \
105+
--name nginx-agent \
106+
-e NGINX_AGENT_COMMAND_SERVER_PROXY_URL=http://proxy.example.com:3128
107+
-e NGINX_AGENT_COMMAND_SERVER_PROXY_AUTH_METHOD=basic
108+
-e NGINX_AGENT_COMMAND_SERVER_PROXY_USERNAME="user"
109+
-e NGINX_AGENT_COMMAND_SERVER_PROXY_PASSWORD="pass"
110+
nginx/nginx-agent:latest
111+
```
112+
113+
87114
## Validate connectivity between NGINX Agent, Squid, and NGINX One Console
88115

89116
TBD

0 commit comments

Comments
 (0)