ruby:3.2.2-slim build image suitable for most Rails 7 apps
10K+
The Dockerfile and build configuration can be found here:
https://github.com/rockitthill/docker-rails7
This provides the following:
ruby:3.2.2-slim/app WORKDIR. This is the path for the Rails application itself.build-essential, curl, git, nanolibmariadb-dev (for MariaDB/MySQL)imagemagick (for Carrierwave, Paperclip, or ActiveStorage)node 20.x (LTS)yarn 1.22bundler global path to /bundle. This can be used as a volume with docker-compose to cache the app's bundle/app/bin first for app-specific bin filesBINDING to 0.0.0.0 (to allow access to the server outside the container)PORT to 3000 (standard rails server port)EDITOR to nano (easier editing of credentials for us non-vim people)3000It is recommended to use this in conjunction with docker-compose:
version: '3.9'
services:
app:
container_name: app
image: rockitthill/rails7:latest
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -b '0.0.0.0'"
restart: "unless-stopped"
volumes:
- bundle-path:/bundle
- .:/app
# Optional:
# - node-modules-path:/app/node_modules
# Add path to logs
# Add path(s) to uploads
ports:
- "3000:3000"
volumes:
bundle-path:
# Optional:
# node-modules-path:
Content type
Image
Digest
sha256:49251c1cd…
Size
266.5 MB
Last updated
almost 3 years ago
docker pull rockitthill/rails7