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
@@ -50,7 +50,7 @@ This utility will walk you through creating the following files with sensible de
50
50
Let's get started!
51
51
52
52
? What application platform does your project use? Rust
53
-
? What version of Rust do you want to use? 1.70.0
53
+
? What version of Rust do you want to use? 1.71.1
54
54
? What port does your server listen on? 8000
55
55
```
56
56
@@ -62,6 +62,140 @@ directory:
62
62
- compose.yaml
63
63
- README.Docker.md
64
64
65
+
## Choose a base image
66
+
67
+
Before editing your Dockerfile, you need to choose a base image. You can use the [Rust Docker Official Image](https://hub.docker.com/_/rust),
68
+
or a [Docker Hardened Image (DHI)](https://hub.docker.com/hardened-images/catalog/dhi/rust).
69
+
70
+
Docker Hardened Images (DHIs) are minimal, secure, and production-ready base images maintained by Docker.
71
+
They help reduce vulnerabilities and simplify compliance. For more details, see [Docker Hardened Images](/dhi/).
72
+
73
+
{{< tabs >}}
74
+
{{< tab name="Using Docker Hardened Images" >}}
75
+
76
+
Docker Hardened Images (DHIs) are available for Rust in the Hardened Image catalog. Unlike the official image, you must first mirror the Rust DHI into your Docker organization.
77
+
Follow the [DHI quickstart](/dhi/get-started/) to mirror the `dhi-rust` repository. Mirrored repositories must start with `dhi-`, for example:
=> => naming to docker.io/library/docker-rust-image:latest 0.0s
251
+
=> => unpacking to docker.io/library/docker-rust-image:latest
115
252
```
116
253
117
254
## View local images
@@ -123,7 +260,7 @@ To list images, run the `docker images` command.
123
260
```console
124
261
$ docker images
125
262
REPOSITORY TAG IMAGE ID CREATED SIZE
126
-
docker-rust-image latest 8cae92a8fbd6 3 minutes ago 123MB
263
+
docker-rust-image latest 0c9f89589c2b 3 minutes ago 123MB
127
264
```
128
265
129
266
You should see at least one image listed, including the image you just built `docker-rust-image:latest`.
@@ -147,9 +284,8 @@ Now, run the `docker images` command to see a list of the local images.
147
284
```console
148
285
$ docker images
149
286
REPOSITORY TAG IMAGE ID CREATED SIZE
150
-
docker-rust-image latest 8cae92a8fbd6 4 minutes ago 123MB
151
-
docker-rust-image v1.0.0 8cae92a8fbd6 4 minutes ago 123MB
152
-
rust latest be5d294735c6 4 minutes ago 113MB
287
+
docker-rust-image latest 0c9f89589c2b 4 minutes ago 123MB
288
+
docker-rust-image v1.0.0 0c9f89589c2b 4 minutes ago 123MB
153
289
```
154
290
155
291
You can see that two images start with `docker-rust-image`. You know they're the same image because if you take a look at the `IMAGE ID` column, you can see that the values are the same for the two images.
@@ -166,8 +302,7 @@ Note that the response from Docker tells you that Docker didn't remove the image
166
302
```console
167
303
$ docker images
168
304
REPOSITORY TAG IMAGE ID CREATED SIZE
169
-
docker-rust-image latest 8cae92a8fbd6 6 minutes ago 123MB
170
-
rust latest be5d294735c6 6 minutes ago 113MB
305
+
docker-rust-image latest 0c9f89589c2b 6 minutes ago 123MB
171
306
```
172
307
173
308
Docker removed the image tagged with `:v1.0.0`, but the `docker-rust-image:latest` tag is available on your machine.
0 commit comments