Skip to content

Update installing-nginx-docker.md #499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
May 5, 2025
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
aafbb3b
Update installing-nginx-docker.md
apgordon312 May 4, 2025
1d3c67c
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
5007c88
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
970f586
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
81bf800
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
1ba637e
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
cc541f4
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
61e8902
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
23f338a
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
7452ab5
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
964f34b
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
394a73e
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
19eeb15
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
d88dd93
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
4803767
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
apgordon312 May 4, 2025
d2f0bba
Update content/nginx/admin-guide/installing-nginx/installing-nginx-do…
mjang May 5, 2025
7d54e37
Merge branch 'main' into patch-6
mjang May 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type:


<span id="nginx_plus_official_images"></span>
## Using official NGINX Plus Docker images
## Use official NGINX Plus Docker images

Since NGINX Plus NGINX Plus [Release 31]({{< ref "nginx/releases.md#r31" >}}) you can get an NGINX Plus image from the official NGINX Plus Docker registry and upload it to your private registry.

Expand Down Expand Up @@ -66,7 +66,7 @@ The NGINX Plus registry contains images for the two most recent versions of NGIN

The image may contain a particular version of NGINX Plus or contain a bundle of NGINX Plus and NGINX Agent, and can be targeted for a specific architecture.

### Listing all tags
### List all tags

For a complete tag list for NGINX Plus bundled with NGINX Agent images, use the command:

Expand All @@ -90,7 +90,7 @@ where:



### Downloading the JSON Web Token or NGINX Plus certificate and key {#myf5-download}
### Download the JSON Web Token or NGINX Plus certificate and key {#myf5-download}

Before you get a container image, you should provide the JSON Web Token file or SSL certificate and private key files provided with your NGINX Plus subscription. These files grant access to the package repository from which the script will download the NGINX Plus package:

Expand All @@ -109,7 +109,7 @@ Before you get a container image, you should provide the JSON Web Token file or

{{% /tabs %}}

### Set up Docker for NGINX Plus Container Registry
### Set up Docker for NGINX Plus container registry

Set up Docker to communicate with the NGINX Container Registry located at `private-registry.nginx.com`.

Expand Down Expand Up @@ -144,7 +144,7 @@ docker login private-registry.nginx.com

{{% /tabs %}}

### Pulling the image
### Pull the image

Next, pull the image you need from `private-registry.nginx.com`.

Expand Down Expand Up @@ -183,7 +183,7 @@ docker pull private-registry.nginx.com/nginx-plus/modules:<version-tag>

{{< include "security/jwt-password-note.md" >}}

### Pushing the image to your private registry
### Push the image to your private registry

After pulling the image, tag it and upload it to your private registry.

Expand All @@ -205,7 +205,7 @@ docker tag private-registry.nginx.com/nginx-plus/base:<version-tag> <my-docker-r
docker push <my-docker-registry>/nginx-plus/base:<version-tag>
```

### Running the NGINX Plus container
### Run the NGINX Plus container

{{< note >}} Starting from [NGINX Plus Release 33]({{< ref "nginx/releases.md#r33" >}}), the JWT file is required for each NGINX Plus instance. For more information, see [About Subscription Licenses]({{< ref "/solutions/about-subscription-licenses.md">}}). {{< /note >}}

Expand Down Expand Up @@ -390,7 +390,7 @@ Any change made to the files in the local directories `/var/www and /var/nginx/c


<span id="manage_copy"></span>
### Copying Content and Configuration Files from the Docker Host
### Copy content and configuration files from the Docker host

Docker can copy the content and configuration files from a local directory on the Docker host during container creation. Once a container is created, the files are maintained by creating a new container when files change or by modifying the files in the container.

Expand Down Expand Up @@ -421,7 +421,7 @@ To make changes to the files in the container, use a helper container as describ


<span id="manage_container"></span>
### Maintaining Content and Configuration Files in the Container
### Maintain content and configuration files in the container

As SSH cannot be used to access the NGINX container, to edit the content or configuration files directly you need to create a helper container that has shell access. For the helper container to have access to the files, create a new image that has the proper Docker data volumes defined for the image:

Expand Down Expand Up @@ -476,12 +476,12 @@ To exit the shell and terminate the container, run the `exit` command.


<span id="log"></span>
## Managing Logging
## Manage logging

You can use default logging or customize logging.

<span id="log_default"></span>
### Using Default Logging
### Use default logging

By default, the NGINX image is configured to send NGINX [access log](https://nginx.org/en/docs/http/ngx_http_log_module.html#access_log) and [error log](https://nginx.org/en/docs/ngx_core_module.html#error_log) to the Docker log collector. This is done by linking them to `stdout` and `stderr`: all messages from both logs are then written to the file `/var/lib/docker/containers/container-ID/container-ID-json.log` on the Docker host. The container‑ID is the long‑form ID returned when you [create a container](#docker_oss_image). To display the long form ID, run the command:

Expand All @@ -507,7 +507,7 @@ To include only access log messages in the output, include only `stdout=1`. To l


<span id="log_custom"></span>
### Using Customized Logging
### Use customized logging

If you want to configure logging differently for certain configuration blocks (such as `server {}` and `location {}`), define a Docker volume for the directory in which to store the log files in the container, create a helper container to access the log files, and use any logging tools. To implement this, create a new image that contains the volume or volumes for the logging files.

Expand All @@ -524,7 +524,7 @@ Then you can [create an image](#docker_plus_image) and use it to create an NGINX


<span id="control"></span>
## Controlling NGINX
## Control NGINX

Since there is no direct access to the command line of the NGINX container, NGINX commands cannot be sent to a container directly. Instead, [signals](https://nginx.org/en/docs/control.html) can be sent to a container via Docker `kill` command.

Expand Down
Loading