Skip to content

Commit 3146a1c

Browse files
Add default docker files description to 7.1 release note
Added the review changes review changes updated
1 parent 8b095c8 commit 3146a1c

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

guides/source/7_1_release_notes.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,40 @@ guide.
2121
Major Features
2222
--------------
2323

24-
### Add default Dockerfiles for Rails applications
24+
### Generate Dockerfiles for new Rails applications
2525

26-
TODO: Add description https://github.com/rails/rails/pull/46762
26+
[Default Docker support](https://github.com/rails/rails/pull/46762) to new rails applications.
27+
When generating a new application, Rails will now include Docker-related files in the application.
28+
29+
These files serve as a foundational setup for deploying your Rails application in a
30+
production environment using Docker. It's important to note that these files are not
31+
meant for development purposes.
32+
33+
Here's a quick example of how to build and run your Rails app using these Docker files:
34+
35+
```bash
36+
docker build -t app .
37+
docker volume create app-storage
38+
docker run --rm -it -v app-storage:/rails/storage -p 3000:3000 --env RAILS_MASTER_KEY=<your-config-master-key> app
39+
```
40+
41+
You can also start a console or runner from this Docker image:
42+
43+
```bash
44+
docker run --rm -it -v app-storage:/rails/storage --env RAILS_MASTER_KEY=<your-config-master-key> app console
45+
```
46+
47+
For those looking to create a multi-platform image (e.g., Apple Silicon for AMD or Intel deployment),
48+
and push it to Docker Hub, follow these steps:
49+
50+
```bash
51+
docker login -u <your-user>
52+
docker buildx create --use
53+
docker buildx build --push --platform=linux/amd64,linux/arm64 -t <your-user/image-name> .
54+
```
55+
56+
This enhancement simplifies the deployment process, providing a convenient starting point for
57+
getting your Rails application up and running in a production environment.
2758

2859
### Add `ActiveRecord::Base.normalizes`
2960

0 commit comments

Comments
 (0)