forked from UffizziCloud/uffizzi_cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (35 loc) · 826 Bytes
/
Dockerfile
File metadata and controls
48 lines (35 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM ruby:3.0.3-alpine AS builder
RUN apk --update add --no-cache \
curl-dev \
ruby-dev \
build-base \
git \
curl \
ruby-json \
openssl \
groff \
bash \
vim
RUN mkdir -p /gem
WORKDIR /gem
ENV GEM_HOME="/usr/local/bundle"
ENV PATH $GEM_HOME/bin:$GEM_HOME/gems/bin:$PATH
RUN gem install bundler -v 2.3.9
COPY lib/uffizzi/version.rb ./lib/uffizzi/
COPY uffizzi.gemspec .
COPY Gemfile* ./
RUN bundle install --jobs 4
COPY . .
RUN bundle exec rake install
# M-M-M-M-MULTISTAGE!!!
FROM ruby:3.0.3 AS shell
RUN apt-get update && apt-get install -y \
vim \
bash \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /root/
COPY docker-entrypoint.sh .
RUN chmod +x docker-entrypoint.sh
COPY --from=builder /gem/pkg/uffizzi-cli* .
RUN gem install ./uffizzi-cli*
ENTRYPOINT ["/root/docker-entrypoint.sh"]