-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (24 loc) · 811 Bytes
/
Dockerfile
File metadata and controls
35 lines (24 loc) · 811 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
FROM quay.io/gapfish/ruby as builder
RUN apt-get update && apt-get install -y build-essential curl
RUN curl -f https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/amd64/kubectl > bin/kubectl && \
chmod +x bin/kubectl
COPY Gemfile .
COPY Gemfile.lock .
RUN mkdir vendor
COPY vendor/cache vendor/cache
RUN bundle install --local
FROM quay.io/gapfish/ruby
WORKDIR /deployer
ENV PATH=/deployer/bin:$PATH
RUN apt-get update && apt-get install -y \
git && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /root/.ssh
COPY known_hosts /root/.ssh/known_hosts
RUN mkdir bin
COPY --from=builder bin/kubectl bin/kubectl
COPY --from=builder /var/lib/gems/2.7.0 /var/lib/gems/2.7.0
COPY --from=builder /usr/local/bin /usr/local/bin
COPY . .
EXPOSE 8080
CMD ["puma", "-C", "config/puma.rb"]