# Cut over to Rails Dockerfile Generator on Sunday 29 Jan 2023

**URL:** <https://community.fly.io/t/cut-over-to-rails-dockerfile-generator-on-sunday-29-jan-2023/10350>\
**Category:** General\
**Tags:** announcement, rails\
**Created:** [January 25, 2023, 7:27pm UTC](https://community.fly.io/t/cut-over-to-rails-dockerfile-generator-on-sunday-29-jan-2023/10350 "2023-01-25T19:27:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubys](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/rubys/32/16907_2.png) [@rubys](https://community.fly.io/u/rubys)\
**Post date:** [January 25, 2023, 7:27pm UTC](https://community.fly.io/t/cut-over-to-rails-dockerfile-generator-on-sunday-29-jan-2023/10350/1 "2023-01-25T19:27:46Z")

</div>

Sometime on Sunday, a new version of flyctl will be released where the current scanner and dockerfile templates will be [replaced](https://github.com/superfly/flyctl/pull/1620) with installing and running the `dockerfile` generator from the [rails-dockerfile](https://github.com/rubys/dockerfile-rails) gem that is being proposed for Rails 7.1.

In a nutshell, instead of Fly providing dockerfiles for Rails applications, for Rails 7.1 and subsequent versions it will use the Dockerfiles that Rails generates. For previous versions of Rails it will use the same generator that is being proposed for Rails 7.1 to generate a Dockerfile.

The port and working directory will be parsed from the Dockerfile.

There are a number of defaults that are different from Rails and the Dockerfiles that Fly currently (and soon to be previously) creates:

- The images will be based on the [official Ruby image](https://hub.docker.com/_/ruby) rather than [fullstaq-ruby](https://quay.io/repository/evl.ms/fullstaq-ruby?tab=tags&tag=latest).
- [jemalloc](https://jemalloc.net/) will not be installed
- `database:prepare` will be run on every deploy rather than as a part of a release step
- Bin stubs will not automatically set the current working directory (which may be useful for `flyctl ssh console`)
- Caches will not be used to speed up package, gem, and npm installs
- No swap will be defined.

Each of these can be enabled by re-running `bin/rails generate dockerfile` with the [relevant option](https://github.com/rubys/dockerfile-rails/blob/main/README.md#usage). Options selected will be remembered and become the defaults for subsequent runs making it easier to upgrade your Dockerfile as your application changes.

In general, the Dockerfiles produced will be smaller and simpler, and the images produced will be smaller and load faster.

Should you have problems, feel free to open an [issue](https://github.com/rubys/dockerfile-rails/issues) or post here on [community.fly.io](http://community.fly.io).

---

<div class="post-metadata">

**Author:** ![rubys](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/rubys/32/16907_2.png) [@rubys](https://community.fly.io/u/rubys)\
**Post date:** [January 26, 2023, 3:44pm UTC](https://community.fly.io/t/cut-over-to-rails-dockerfile-generator-on-sunday-29-jan-2023/10350/2 "2023-01-26T15:44:30Z")

</div>

Beginnings of a FAQ: [Dockerfiles and fly.toml · Fly Docs](https://fly.io/docs/rails/getting-started/dockerfiles/)

---

<div class="post-metadata">

**Author:** ![rubys](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/rubys/32/16907_2.png) [@rubys](https://community.fly.io/u/rubys)\
**Post date:** [January 29, 2023, 4:09pm UTC](https://community.fly.io/t/cut-over-to-rails-dockerfile-generator-on-sunday-29-jan-2023/10350/3 "2023-01-29T16:09:44Z")

</div>

Avilable now as a pre-release:

```auto
curl -L https://fly.io/install.sh | sh -s pre

```

---

<div class="post-metadata">

**Author:** ![rubys](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/rubys/32/16907_2.png) [@rubys](https://community.fly.io/u/rubys)\
**Post date:** [January 29, 2023, 9:59pm UTC](https://community.fly.io/t/cut-over-to-rails-dockerfile-generator-on-sunday-29-jan-2023/10350/4 "2023-01-29T21:59:32Z")

</div>

And now live with fly v0.0.451
