forked from bigbluebutton/greenlight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
75 lines (66 loc) · 1.49 KB
/
Dockerfile.dev
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM alpine:3.17 AS alpine
ARG RAILS_ROOT=/usr/src/app
ENV RAILS_ROOT=${RAILS_ROOT}
FROM alpine AS base
WORKDIR $RAILS_ROOT
RUN apk add --no-cache \
libpq \
libxml2 \
libxslt \
ruby \
ruby-irb \
ruby-bigdecimal \
ruby-bundler \
ruby-json \
tzdata \
bash \
shared-mime-info
FROM base as builder
RUN apk add --no-cache \
build-base \
curl-dev \
git \
libxml2-dev \
libxslt-dev \
pkgconf \
postgresql-dev \
ruby-dev \
nodejs \
yarn \
yaml-dev \
zlib-dev \
&& ( echo 'install: --no-document' ; echo 'update: --no-document' ) >>/etc/gemrc
COPY Gemfile* ./
RUN bundle config build.nokogiri --use-system-libraries \
&& bundle config set --local deployment 'true' without 'development:test'
RUN bundle install --deployment -j4 \
&& yarn install
RUN rm -rf vendor/bundle/ruby/*/cache
COPY . ./
FROM base
RUN apk add --no-cache \
build-base \
curl-dev \
libxml2-dev \
libxslt-dev \
pkgconf \
postgresql-dev \
ruby-dev \
nodejs \
yarn \
yaml-dev \
zlib-dev \
&& ( echo 'install: --no-document' ; echo 'update: --no-document' ) >>/etc/gemrc
#USER greenlight:greenlight
ARG RAILS_ENV
ENV RAILS_ENV=${RAILS_ENV:-production}
ARG RAILS_LOG_TO_STDOUT
ENV RAILS_LOG_TO_STDOUT=${RAILS_LOG_TO_STDOUT:-true}
ARG VERSION_CODE
ENV VERSION_CODE=$VERSION_CODE
RUN pwd
COPY --from=builder $RAILS_ROOT $RAILS_ROOT
RUN ls -al
EXPOSE 3000
CMD [ "./bin/start" ]
#ENTRYPOINT [ "./bin/start" ]