-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_stdl_2
48 lines (36 loc) · 1.14 KB
/
Dockerfile_stdl_2
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
FROM ubuntu:18.04
ENV RUBY_VERSION 2.5.1
# Update
RUN apt update && apt -y upgrade
RUN apt -y install wget curl curl gnupg2
# Install RVM
# RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
# RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN \curl -sSL https://get.rvm.io | bash
RUN \touch .bashrc
RUN echo 'source /etc/profile.d/rvm.sh' > .bashrc
# Install Ruby
RUN /bin/bash -l -c 'rvm requirements'
RUN /bin/bash -l -c 'rvm install $RUBY_VERSION'
# Install bundler
RUN /bin/bash -l -c 'gem install bundler --no-doc --no-ri'
#=========
# Firefox
#=========
RUN apt install -y firefox
#=========
# Google Chrome
#=========
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install
#
# # OR change to Chromium instead of Google Chrome
# # RUN apt install -y chromium
RUN /bin/bash -l -c 'bundle config --global frozen 1'
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . .
RUN /bin/bash -l -c 'bundle install'
# RUN ls -la .
# ENTRYPOINT /bin/bash -l -c
CMD /bin/bash -l -c 'bundle exec rspec'