-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
66 lines (54 loc) · 1.8 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
56
57
58
59
60
61
62
63
64
65
66
# FROM ejavaguy/capstone_rails_onbuild-2.3.8:latest
# this file creates a ruby VM that provides and environment
# running the capstone software and hosting RSpec and Capybara
# tests
# FROM ruby:2.3.1
# FROM ruby:2.3.8
FROM ruby:2.5.1
MAINTAINER Jim Stafford <[email protected]>
# Install firefox (aka iceweasel)
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
iceweasel
# -qq
# -qq
# Install LXDE and VNC server to be able to see firefox
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
lxde-core \
lxterminal \
tightvncserver
ENV USER root
# install phantomjs - download from https://bitbucket.org/ariya/phantomjs/downloads
ADD https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 .
RUN tar -xjf phantomjs-2.1.1-linux-x86_64.tar.bz2
RUN mv ./phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin
RUN rm -rf ./phantomjs-2.1.1-linux-x86_64
RUN phantomjs --version
# install postgres and nodejs Rails support packages
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
build-essential \
libpq-dev \
postgresql-client \
nodejs
# install ghostscript fonts for already installed imagemagick
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
ghostscript
# cleanup repositories
RUN rm -rf /var/lib/apt/lists/*
# cache pertinent gems
# define a directory within the VM for the application
ENV APP_HOME /myapp
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
# VM will be rebuilt from this point when these files change
ADD Gemfile $APP_HOME
ADD Gemfile.lock $APP_HOME
RUN bundle config --global --jobs 4
RUN bundle install
# copy this last since has the most likely changes
ENV DISPLAY :0
# COPY vnc.sh /usr/local/bin
EXPOSE 3000 5900