Improve dockerfile
This commit is contained in:
parent
1c4c93afd2
commit
97c69097cd
13
Dockerfile
13
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
|
RUN apk add build-base libpq-dev tzdata
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ADD Gemfile* ./
|
ADD Gemfile* ./
|
||||||
|
|
||||||
RUN bundle
|
RUN bundle
|
||||||
|
|
||||||
ADD . ./
|
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"]
|
CMD ["./entrypoint.sh"]
|
||||||
|
Loading…
Reference in New Issue
Block a user