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
<!--Delete sections as needed -->
* Updated Ruby containerization guide to use dhi.io for hardened images.
* Used abbreviations for hardened images (DHI) and official images (DOI)
to align with official manuals
(https://docs.docker.com/dhi/migration/examples/go/). Optional and can
be changed to a better wording.
* Bumped Ruby version to 3.4.8.
## Reviews
<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->
- [ ] Technical review
- [x] Editorial review
- [ ] Product review
Copy file name to clipboardExpand all lines: content/guides/ruby/containerize.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,18 +26,18 @@ If you have an existing Rails application, you will need to create the Docker as
26
26
27
27
## 1. Initialize Docker assets
28
28
29
-
Rails 7.1 and newer generates multistage Dockerfile out of the box. Following are two versions of such a file: one using Docker Hardened Images (DHI) and another using the official Docker image.
29
+
Rails 7.1 and newer generates multistage Dockerfile out of the box. Following are two versions of such a file: one using Docker Hardened Images (DHIs) and another using the Docker Official Image (DOIs). Although the Dockerfile is generated automatically, understanding its purpose and functionality is important. Reviewing the following example is highly recommended.
30
30
31
-
> [Docker Hardened Images (DHIs)](https://docs.docker.com/dhi/) are minimal, secure, and production-ready container base and application images maintained by Docker.
31
+
[Docker Hardened Images (DHIs)](https://docs.docker.com/dhi/) are minimal, secure, and production-ready container base and application images maintained by Docker. DHIs are recommended whenever it is possible for better security. They are designed to reduce vulnerabilities and simplify compliance, freely available to everyone with no subscription required, no usage restrictions, and no vendor lock-in.
32
32
33
-
DHI images are recommended whenever it is possible for better security. They are designed to reduce vulnerabilities and simplify compliance.
33
+
Multistage Dockerfiles help create smaller, more efficient images by separating build and runtime dependencies, ensuring only necessary components are included in the final image. Read more in the [Multi-stage builds guide](/get-started/docker-concepts/building-images/multi-stage-builds/).
34
34
35
-
> Multistage Dockerfiles help create smaller, more efficient images by separating build and runtime dependencies, ensuring only necessary components are included in the final image. Read more in the [Multi-stage builds guide](/get-started/docker-concepts/building-images/multi-stage-builds/).
36
35
37
-
Although the Dockerfile is generated automatically, understanding its purpose and functionality is important. Reviewing the following example is highly recommended.
38
36
39
37
{{< tabs >}}
40
-
{{< tab name="Using Docker Hardened Images" >}}
38
+
{{< tab name="Using DHIs" >}}
39
+
40
+
You must authenticate to `dhi.io` before you can pull Docker Hardened Images. Run `docker login dhi.io` to authenticate.
41
41
42
42
```dockerfile {title=Dockerfile}
43
43
# syntax=docker/dockerfile:1
@@ -50,8 +50,8 @@ Although the Dockerfile is generated automatically, understanding its purpose an
50
50
# For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html
51
51
52
52
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
53
-
ARG RUBY_VERSION=3.4.7
54
-
FROM<your-namespace>/dhi-ruby:$RUBY_VERSION-dev AS base
0 commit comments