nathandemick.com

Build a minimal Docker image for Rails

FROM ruby:3-alpine

RUN apk update
RUN apk add --no-cache \
    build-base \
    nodejs \
    yarn \
    sqlite-dev

WORKDIR /app
COPY Gemfile Gemfile.lock /app/

RUN bundle install

EXPOSE 3000

CMD ["rails", "server", "--binding=0.0.0.0"]

· 0 comments


Comments