forked from rubygems/shipit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (36 loc) · 1.03 KB
/
Dockerfile
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
# FROM ruby:2.5-alpine
FROM ruby@sha256:b752ec96b4f33c31f0081b1b7b23761c0de9fb1322ad8c621aa8731ee1c3ab86
RUN apk update && apk --update add \
ruby-io-console \
# libstdc++ \
tzdata \
mysql-client \
nodejs
COPY Gemfile /app/
COPY Gemfile.lock /app/
RUN apk --update add \
--virtual build-dependencies \
build-base \
ruby-dev \
# openssl-dev \
mysql-dev \
libc-dev \
linux-headers \
git \
openssh-client \
bash \
&& gem install bundler && \
cd /app ; bundle install --without development test && \
gem install kubernetes-deploy --no-document --version=0.30.0
COPY . /app
COPY root/ root/
RUN chmod -R 700 root/.ssh
ADD https://storage.googleapis.com/kubernetes-release/release/v1.15.11/bin/linux/amd64/kubectl /usr/bin/kubectl
RUN chmod +x /usr/bin/kubectl
COPY kubeconfig.yml /root/.kube/config
COPY kubeconfig.yml /home/deploy/.kube/config
WORKDIR /app
RUN RAILS_ENV=production bin/rails assets:precompile
EXPOSE 3000
ENTRYPOINT ["bin/entrypoint.sh"]
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]