generated from spree/spree_starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.development
49 lines (39 loc) · 1.47 KB
/
Dockerfile.development
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
FROM ruby:2.7.4
# SET CHROME WEB DRIVER VARIABLES
ENV CHROMEDRIVER_VERSION 80.0.3987.16
ENV CHROMEDRIVER_DIR /chromedriver
RUN apt-get update -yq \
&& apt-get upgrade -yq \
#ESSENTIALS
&& apt-get install -y -qq --no-install-recommends build-essential curl git-core vim passwd unzip cron gcc wget netcat \
# RAILS PACKAGES NEEDED
&& apt-get update \
&& apt-get install -y --no-install-recommends imagemagick postgresql-client \
# INSTALL CHROME WEB DRIVER
&& apt-get update \
&& apt-get install -y xvfb \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
&& apt-get update \
&& apt-get install -y google-chrome-stable \
&& mkdir $CHROMEDRIVER_DIR \
&& wget -q --continue -P $CHROMEDRIVER_DIR "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" \
&& unzip $CHROMEDRIVER_DIR/chromedriver* -d $CHROMEDRIVER_DIR
ENV PATH $CHROMEDRIVER_DIR:$PATH
# Clean cache and temp files, fix permissions
RUN apt-get clean -qy \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /app
WORKDIR /app
# install specific version of bundler
RUN gem install bundler -v 2.1.4
ENV BUNDLE_GEMFILE=/app/Gemfile \
BUNDLE_JOBS=20 \
BUNDLE_PATH=/bundle \
BUNDLE_BIN=/bundle/bin \
GEM_HOME=/bundle
ENV PATH="${BUNDLE_BIN}:${PATH}"
COPY Gemfile Gemfile.lock ./
RUN bundle install
EXPOSE 3000
CMD ["bash"]