forked from doubtfire-lms/doubtfire-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
67 lines (48 loc) · 1.4 KB
/
Dockerfile
File metadata and controls
67 lines (48 loc) · 1.4 KB
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
FROM debian:stretch
ENV DEBIAN_FRONTEND noninteractive
# Install build dependencies. Note that python is required to build Node.
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
autoconf \
bison \
build-essential \
ca-certificates \
curl \
git-core \
libcurl4-openssl-dev \
libffi-dev \
libgdbm3 \
libgdbm-dev \
libreadline-dev \
libncurses5-dev \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
libyaml-dev \
python \
sqlite3 \
zlib1g-dev \
software-properties-common
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get install nodejs
RUN node -v && npm -v
# Clone everything, and setup the path.
RUN git clone https://github.com/rbenv/rbenv.git /root/.rbenv && \
git clone https://github.com/rbenv/ruby-build.git /root/.rbenv/plugins/ruby-build
ENV PATH /root/.rbenv/shims:/root/.rbenv/bin:$PATH
ARG RUBY_VERSION=2.5.1
ENV RUBY_VERSION=${RUBY_VERSION}
RUN rbenv install ${RUBY_VERSION}
RUN CONFIGURE_OPTS="--disable-install-doc" rbenv global ${RUBY_VERSION} && \
gem install bundler
WORKDIR /doubtfire-web
EXPOSE 4200
ENV NODE_ENV docker
# Ruby required for SASS
RUN gem install sass
# To rebuild Docker image faster, copy dependency information files only
COPY package.json package-lock.json /doubtfire-web/
RUN npm install
CMD npm start