From 97c69097cd91e44389dacd2e238429c6b0d2b844 Mon Sep 17 00:00:00 2001 From: Hugo Peixoto Date: Thu, 28 Mar 2024 11:35:38 +0000 Subject: [PATCH] Improve dockerfile --- Dockerfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 486fbfa..7db5bd5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]