Skip to content

Commit 0029d64

Browse files
Reduce image size (#45)
1 parent 34a704f commit 0029d64

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
FROM ruby:2.6.6-alpine3.13
1+
FROM ruby:2.6.6-alpine3.13 AS build
22

33
RUN apk update && apk upgrade && \
4-
apk add --no-cache bash git openssh build-base gcc wget git
4+
apk add --no-cache git openssh build-base gcc wget git
55

66
RUN gem install bundler -v 2.3.6
77

8-
WORKDIR /opt/representer
9-
108
COPY Gemfile Gemfile.lock .
119

1210
RUN bundle install
1311

12+
FROM ruby:2.6.6-alpine3.13 AS runtime
13+
14+
RUN apk add --no-cache bash
15+
16+
WORKDIR /opt/representer
17+
18+
COPY --from=build /usr/local/bundle /usr/local/bundle
19+
1420
COPY . .
1521

1622
ENTRYPOINT ["sh", "/opt/representer/bin/run.sh"]

0 commit comments

Comments
 (0)