The builder config now supports specifying a target, e.g.:
config/deploy.yml
builder:
target: prod
for a Dockerfile that's structured like:
ARG RUBY_VERSION=3.2.2
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base
... etc ...
FROM base as build
... etc ...
FROM base as app
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD ["./bin/rails", "server"]
FROM app as prod
ENV RAILS_ENV="production"
FROM app as staging
ENV RAILS_ENV="staging"
The builder config now supports specifying a target, e.g.:
config/deploy.yml
for a Dockerfile that's structured like: