Skip to content

Commit caba6a6

Browse files
Rough attempt to make this more efficient
1 parent ab4324c commit caba6a6

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

Dockerfile

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,34 @@
1-
FROM ruby:3.4.3-alpine
1+
FROM ruby:3.4.4-alpine AS builder
22
USER root
3+
4+
RUN apk add --no-cache \
5+
build-base \
6+
ruby-dev \
7+
libffi-dev \
8+
yaml-dev
9+
310
WORKDIR /build
411

5-
COPY Gemfile /build/
6-
COPY *.gemspec /build/
12+
COPY Gemfile Gemfile.lock ./
13+
COPY *.gemspec ./
14+
15+
RUN gem update --system && \
16+
bundle config set jobs $(nproc) && \
17+
bundle install --jobs=$(nproc) --retry=3 --without development test
18+
19+
COPY . .
20+
21+
FROM ruby:3.4.3-alpine
22+
USER root
23+
24+
RUN apk add --no-cache \
25+
libffi \
26+
yaml
727

8-
RUN gem update \
9-
&& bundle config set jobs $(nproc) \
10-
&& bundle install
28+
WORKDIR /app
1129

12-
COPY . /build
30+
COPY --from=builder /usr/local/bundle /usr/local/bundle
31+
COPY --from=builder /build /app
1332

1433
WORKDIR /
15-
ENTRYPOINT [ "/build/bin/wayback_machine_downloader" ]
34+
ENTRYPOINT [ "/app/bin/wayback_machine_downloader" ]

0 commit comments

Comments
 (0)