Dockerfile to deploy a RAILS application

I just wanted to share a Dockerfile for deploying a RAILS application

# syntax=docker/dockerfile:1
FROM ruby:3.0
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
WORKDIR /myapp
COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
RUN bundle install

COPY . .


# Configure the main process to run when running the image
CMD ["rails", "server", "-b", "", "-p", "3000"]

Note: you can change the ruby version for the image.