Improve dockerfile

This commit is contained in:
Hugo Peixoto 2024-03-28 11:35:38 +00:00
parent 1c4c93afd2
commit 97c69097cd

View File

@ -1,12 +1,17 @@
FROM ruby:3.1.2-alpine
FROM ruby:3.1.2-alpine AS builder
RUN apk add build-base libpq-dev tzdata
WORKDIR /app
ADD Gemfile* ./
RUN bundle
ADD . ./
FROM ruby:3.1.2-alpine
RUN apk add libpq tzdata
COPY --from=builder /usr/local/bundle/ /usr/local/bundle/
COPY --from=builder /app /app
WORKDIR /app
CMD ["./entrypoint.sh"]