-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
34 lines (26 loc) · 990 Bytes
/
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
FROM ruby:2.6.4
ARG RAILS_ENV=development
ARG RAILS_MASTER_KEY=
ENV PORT=8080
ENV BUNDLE_FROZEN=true
ENV RAILS_LOG_TO_STDOUT=1
RUN gem install bundler --version "2.0.2"
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get upgrade -y && \
apt-get install --no-install-recommends -y ca-certificates nodejs \
libicu-dev imagemagick unzip qt5-default libqt5webkit5-dev \
gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x \
xvfb xauth yarn vim --fix-missing
WORKDIR /usr/src/app
COPY . /usr/src/app/
RUN yarn install && \
bundle install && \
if [ $RAILS_ENV = "production" ]; then \
RAILS_ENV=production bundle exec rake assets:precompile; \
fi
ENV RAILS_ENV=development
ENV RAILS_MASTER_KEY=
ENTRYPOINT [ "./docker-entrypoint.sh" ]
CMD bundle exec rails s -p ${PORT} -b '0.0.0.0'