-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
74 lines (59 loc) · 1.75 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
67
68
69
70
71
72
73
74
FROM heroku/heroku:18
MAINTAINER Kevan Moothien <kevanmoothien@gmail.com>
RUN apt-get update -qq && \
apt-get install -y -qq --no-install-recommends \
build-essential\
libpq-dev\
libxml2-dev\
libxslt1-dev\
qt5-default\
libqt5webkit5-dev\
gstreamer1.0-plugins-base\
gstreamer1.0-tools\
gstreamer1.0-x\
xvfb \
ruby-dev \
wget \
unzip \
libnss3 \
libgconf-2-4 \
sudo \
&& apt-get autoremove \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* \
&& truncate -s 0 /var/log/*log
# Ruby heroku
RUN apt-get remove -y --purge ruby && curl -s --retry 3 -L https://heroku-buildpack-ruby.s3.amazonaws.com/heroku-18/ruby-2.6.1.tgz | tar -xz && \
bundle config --global silence_root_warning 1
# Node heroku
RUN export NODE_VERSION=8.10.0 && \
curl -s --retry 3 -L https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz -o /tmp/node-v$NODE_VERSION-linux-x64.tar.gz && \
tar -xzf /tmp/node-v$NODE_VERSION-linux-x64.tar.gz -C /tmp && \
rsync -a /tmp/node-v$NODE_VERSION-linux-x64/ / && \
rm -rf /tmp/node-v$NODE_VERSION-linux-x64*
# Bundle
# COPY Gemfile /var/app
# COPY Gemfile.lock /var/app
# RUN bundle install
# Node
# COPY package.json /var/app
# COPY bower.json /var/app
# COPY .bowerrc /var/app
# COPY gulpfile.js /var/app
# COPY gulpfile.coffee /var/app
# RUN npm install --unsafe-perm
# RUN ./node_modules/.bin/bower install --quiet
RUN adduser --gecos '' user && passwd -d user && adduser user sudo
RUN mkdir -p /bundle
RUN chown user:user /bundle
RUN chown user:user /lib/node_modules
USER user
ENV BUNDLE_PATH=/bundle \
BUNDLE_BIN=/bundle/bin \
GEM_HOME=/bundle
ENV PATH="/home/user/bin:$PATH"
WORKDIR /home/user
EXPOSE 5000
EXPOSE 5001
# COPY . /var/app
CMD bash