Skip to content
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

Refactor Build container images page #827

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions scripts/docker/nginx-plus/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN --mount=type=secret,id=nginx-crt,dst=/nginx-repo.crt \
ca-certificates \
gnupg \
lsb-release \
procps \
&& \
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
found=''; \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ If you want to use NGINX Agent with NGINX Plus, you need to purchase an NGINX Pl

See the requirements and supported operating systems in the [NGINX Agent Technical Specifications]({{< relref "technical-specifications.md" >}}) topic.

## Deploying NGINX and NGINX Plus on Docker

You can access container images by visiting the following page:

[Deploying NGINX and NGINX Plus on Docker](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-docker/)
nginx-seanmoloney marked this conversation as resolved.
Show resolved Hide resolved

This page provides instructions on how to build images with the NGINX agent and NGINX packaged together. It includes steps for downloading the necessary Docker images, configuring your Docker environment, and deploying NGINX and NGINX Plus containers.
nginx-seanmoloney marked this conversation as resolved.
Show resolved Hide resolved

## Set up your environment

Expand Down Expand Up @@ -199,6 +206,11 @@ docker run --name nginx-agent -d \
nginx-agent
```

To ensure that the REST Interface is correctly configured, you can curl the following endpoint from your terminal:
nginx-seanmoloney marked this conversation as resolved.
Show resolved Hide resolved
```shell
curl 0.0.0.0:8038/nginx/
```

Jcahilltorre marked this conversation as resolved.
Show resolved Hide resolved
<hr>

## Build the NGINX Agent images for specific OS targets
Expand All @@ -215,9 +227,10 @@ You can pass the following arguments when running the **make** command to build
{{<bootstrap-table "table table-striped table-border">}}
Jcahilltorre marked this conversation as resolved.
Show resolved Hide resolved
| Argument | Definition |
| ---------------- | -------------------------|
| PACKAGE_NAME | **Required.** The full path to the downloaded [agent binary package](#agent-binary). <br>Must precede the **make** command. |
| OS_RELEASE | The Linux distribution to use as the base image. <br>Can also be set in the repo Makefile.|
| OS_VERSION | The version of the Linux distribution to use as the base image. <br>Can also be set in the repo Makefile.|
| AGENT_VERSION | The versions of NGINX agent that you want installed on the image.|

{{</bootstrap-table>}}

Refer to the [Supported distributions]({{< relref "/technical-specifications.md#supported-distributions" >}}) table to find out which base images you can use.
Expand All @@ -230,75 +243,18 @@ Keep the following information in mind when using the NGINX Agent [Dockerfiles](

### Build NGINX open source images

Run the following **make** command to build the default image, which uses Alpine 3.19 as the base image.
Run the following **make** command to build the default image, which uses Alpine as the base image.
nginx-seanmoloney marked this conversation as resolved.
Show resolved Hide resolved

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] make official-oss-image
IMAGE_BUILD_TARGET=install-agent-repo make oss-image
```

### Example build commands by distribution

{{<tabs name="build-oss-image">}}

{{%tab name="alma linux"%}}
To build an image with debian and older version of the NGINX Agent you can run the following command.
nginx-seanmoloney marked this conversation as resolved.
Show resolved Hide resolved

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=almalinux make oss-image
IMAGE_BUILD_TARGET=install-agent-repo NGINX_AGENT_VERSION=2.37.0~bullseye OS_RELEASE=debian OS_VERSION=bullseye-slim make oss-image
```

{{% /tab %}}

{{%tab name="alpine linux"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=alpine make oss-image
```

{{% /tab %}}

{{%tab name="amazon linux"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=amazonlinux make oss-image
```

{{% /tab %}}

{{%tab name="debian"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=debian make oss-image
```

{{% /tab %}}

{{%tab name="oracle linux"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=oraclelinux make oss-image
```

{{% /tab %}}

{{%tab name="rocky linux"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=rockylinux make oss-image
```

{{% /tab %}}

{{%tab name="ubuntu"%}}

The command below creates a base image using the most recent LTS version of Ubuntu as the base image:

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] make oss-image OS_RELEASE=ubuntu
```

{{% /tab %}}

{{% /tabs %}}

### Build NGINX Plus images

Expand All @@ -307,75 +263,12 @@ PACKAGE_NAME=[PATH-TO-PACKAGE] make oss-image OS_RELEASE=ubuntu
Run the following `make` command to build the default image, which uses Ubuntu 24.04 (Noble) as the base image.

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] make official-plus-image
IMAGE_BUILD_TARGET=install-agent-repo make image
```

### Example NGINX Plus build commands by distribution

{{<tabs name="build-image">}}

{{%tab name="alpine linux"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=alpine make official-plus-image
```

{{% /tab %}}

{{%tab name="amazon linux"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=amazonlinux make official-plus-image
```

{{% /tab %}}

{{%tab name="centos"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=centos OS_VERSION=7 make official-plus-image
```

{{% /tab %}}

{{%tab name="debian"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=debian OS_VERSION=bullseye-slim make official-plus-image
```

{{% /tab %}}

{{%tab name="oracle linux"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=oraclelinux make official-plus-image
```

{{% /tab %}}

{{%tab name="rhel"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=redhatenterprise make official-plus-image
```

{{% /tab %}}

{{%tab name="suse"%}}

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=suse OS_VERSION=sle15 make official-plus-image
```

{{% /tab %}}

{{%tab name="ubuntu"%}}
To build an image with debian and older version of the NGINX Agent you can run the following command.
nginx-seanmoloney marked this conversation as resolved.
Show resolved Hide resolved

```shell
PACKAGE_NAME=[PATH-TO-PACKAGE] OS_RELEASE=ubuntu make official-plus-image
IMAGE_BUILD_TARGET=install-agent-repo NGINX_AGENT_VERSION=2.37.0~bullseye OS_RELEASE=debian OS_VERSION=bullseye-slim make image
```

{{% /tab %}}

{{% /tabs %}}
Loading