dockerfile-rails
bgems
dockerfile-rails | bgems | |
---|---|---|
5 | 1 | |
447 | 1 | |
3.1% | - | |
8.9 | 10.0 | |
9 days ago | about 10 years ago | |
Dockerfile | Ruby | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dockerfile-rails
-
Rails 7.1: Dockerfiles, BYO Authentication, More Async Queries, and More
If you want to automatically generate Dockerfiles for more versions of Rails (not just the latest) that detect OS packages that need to be installed from gems present in your Gemfile, check out https://github.com/fly-apps/dockerfile-rails
You can install it in your rails app by running:
1. bundle add dockerfile-rails
2. rails g dockerfile
-
Around the World with SQLite3 and Rsync
> I felt bad
Don't. I can honestly say that I didn't write this post targeting HN. I'll go further... this post wasn't meant for people who are unlikely to use https://github.com/fly-apps/dockerfile-rails#overview. I recently added some features to that gem whose usage may not be intuitively obvious. I wrote this post to explain some of the motivation for those features.
I don't know how to mark posts as not intended for HN (and truth be told, if there was such a feature, I'd be inclined to overuse it). I don't know where else I should have posted this content, but I'm not sure I would be inclined to move it. In any case, this post, as written, serves a purpose for me. Somebody not you and not me felt it belonged here. We can both second guess that decision. Either way, there is no reason for either of us to feel bad.
-
Rapid growth, lessons learned and improvements at Fly.io
Did you try migrating with this guide? https://fly.io/docs/rails/getting-started/migrate-from-herok...
The issues you ran into with older versions of Rails was probably because the Dockerfile that `fly launch` generated was for new versions of Rails. We switched to https://github.com/rubys/dockerfile-rails to streamline Dockerfile generation and support older versions of Rails.
If you try it again and run into issues you can open an issue at https://github.com/rubys/dockerfile-rails/issues or post in https://community.fly.io and somebody will help get that sorted out.
The more versions of Rails we can deploy the better!
-
Rails on Docker · Fly
At the moment Rails is focused on simplicity/readability. I've got a gem that I'm proposing (and DHH is evaluating) that adds caching as an option: https://github.com/rubys/dockerfile-rails#overview
-
Rails on Docker
even though the article does not go deep into multistage builds Fly.io does provide cookbooks and even a link to a Rails generator there.
bgems
-
Rails on Docker · Fly
One problem you're likely to run into is that systems using the same packaging lineage cut the same dependency up in different ways. The "right name" for a dependency can change between Ubuntu and Debian, between different releases of Ubuntu, and different architectures. It very quickly gets out of hand for any interesting set of dependencies. Now it might be that there's enough stability in the repositories these days that that's less true than it was, but I remember running into some really annoying cases at one point when I had a full gem mirror to play with.
This is one of those problems that sounds easy but gets really fiddly. I had a quick run at it from a slightly different direction a looooong time ago: binary gems (https://github.com/regularfry/bgems although heaven knows if it even still runs). Precompiled binary gems would dramatically speed up installation at the cost of a) storage; and b) getting it right once. The script I cobbled together gathers the dependencies together into a `.Depends` file which you can just pipe through to the package manager, and could happily use to strap together a package corresponding to the dependency list.
I've never really understood why a standard for precompiled gems never emerged, but it turns out it's drop-dead simple to implement. The script does some linker magic to reverse engineer the dpkg package dependency list from a compiled binary. I was quite pleased with it at the time, and while I don't think it's bullet-proof I do think it's worth having a poke at for ideas. Of course it can only detect binary dependencies, not data dependencies or anything more interesting, so there's still room for improvement.
What are some alternatives?
docked - Running Rails from Docker for easy start to development
docker-projects
lamby - 🐑🛤 Simple Rails & AWS Lambda Integration
deploy-cloud-functions - A GitHub Action that deploys source code to Google Cloud Functions.
cruftspy - Detect unnecessary files in Docker images
libaws - aws should be easy
dockerfiles - Various Dockerfiles I use on the desktop and on servers.
buildkit - concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
buildah - A tool that facilitates building OCI images.