@@ -21,9 +21,40 @@ guide.
21
21
Major Features
22
22
--------------
23
23
24
- ### Add default Dockerfiles for Rails applications
24
+ ### Generate Dockerfiles for new Rails applications
25
25
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.
27
58
28
59
### Add ` ActiveRecord::Base.normalizes `
29
60
0 commit comments