You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/guides/reactjs/containerize.md
+19-4Lines changed: 19 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,17 +129,32 @@ Choosing DHI offers the advantage of a production-ready image that is lightweigh
129
129
130
130
{{< tabs >}}
131
131
{{< tab name="Using Docker Hardened Images" >}}
132
-
Docker Hardened Images (DHIs) are available for Node.js on [Docker Hub](https://hub.docker.com/hardened-images/catalog/dhi/node). Unlike using the Docker Official Image, you must first mirror the Node.js image into your organization and then use it as your base image. Follow the instructions in the [DHI quickstart](/dhi/get-started/)to create a mirrored repository for Node.js.
132
+
Docker Hardened Images (DHIs) are available for Node.js in the [Docker Hardened Images catalog](https://hub.docker.com/hardened-images/catalog/dhi/node). Docker Hardened Images are freely available to everyone with no subscription required. You can pull and use them like any other Docker image after signing in to the DHI registry. For more information, see the [DHI quickstart](/dhi/get-started/)guide.
133
133
134
-
Mirrored repositories must start with `dhi-`, for example: `FROM <your-namespace>/dhi-node:<tag>`. In the following Dockerfile, the `FROM` instruction uses `<your-namespace>/dhi-node:24-alpine3.22-dev` as the base image.
134
+
1. Sign in to the DHI registry:
135
+
```console
136
+
$ docker login dhi.io
137
+
```
138
+
139
+
2. Pull the Node.js DHI (check the catalog for available versions):
140
+
```console
141
+
$ docker pull dhi.io/node:24-alpine3.22-dev
142
+
```
143
+
144
+
3. Pull the Nginx DHI (check the catalog for available versions):
145
+
```console
146
+
$ docker pull dhi.io/nginx:1.28.0-alpine3.21-dev
147
+
```
148
+
149
+
In the following Dockerfile, the `FROM` instructions use `dhi.io/node:24-alpine3.22-dev` and `dhi.io/nginx:1.28.0-alpine3.21-dev` as the base images.
135
150
136
151
```dockerfile
137
152
# =========================================
138
153
# Stage 1: Build the React.js Application
139
154
# =========================================
140
155
141
156
# Use a lightweight Node.js image for building (customizable via ARG)
142
-
FROM<your-namespace>/dhi-node:24-alpine3.22-dev AS builder
157
+
FROM dhi.io/node:24-alpine3.22-dev AS builder
143
158
144
159
# Set the working directory inside the container
145
160
WORKDIR /app
@@ -160,7 +175,7 @@ RUN npm run build
160
175
# Stage 2: Prepare Nginx to Serve Static Files
161
176
# =========================================
162
177
163
-
FROM<your-namespace>/dhi-nginx:1.28.0-alpine3.21-dev AS runner
0 commit comments