forked from Gusto/grpc-web-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (49 loc) · 1.25 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
48
49
50
51
52
53
54
55
FROM ruby:2.5.7
# Install dependency packages
RUN apt-get update && apt-get install -y \
curl \
fonts-liberation \
libappindicator3-1 \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libatspi2.0-0 \
libcups2 \
libdbus-1-3 \
libgbm1 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libx11-xcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxss1 \
libxtst6 \
nodejs \
xdg-utils \
libvulkan1 \
libu2f-udev
# Install Chrome
RUN wget --quiet https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& dpkg -i google-chrome-stable_current_amd64.deb \
&& apt-get -f install \
&& rm -f /google-chrome-stable_current_amd64.deb
# Install Yarn
ENV PATH=/root/.yarn/bin:$PATH
RUN touch ~/.bashrc && \
curl -o- -L https://yarnpkg.com/install.sh | sh
# Setup project home directory
RUN mkdir /app
WORKDIR /app
# Add Gemfile and cache results of bundle install
COPY .ruby-version grpc-web.gemspec Gemfile Gemfile.lock /app/
COPY lib/grpc_web/version.rb /app/lib/grpc_web/
RUN gem install bundler -v 2.3.26 \
&& bundle config --global frozen 1 \
&& bundle install -j4 --retry 3 \
# Remove unneeded files (cached *.gem, *.o, *.c)
&& rm -rf /usr/local/bundle/cache/*.gem