forked from web-cat/code-workout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
75 lines (61 loc) · 1.82 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
75
FROM ruby:2.6.3
LABEL MAINTAINER Jihane Najdi <[email protected]>
# Default environment
ARG RAILS_ENV='development'
ARG BASEDIR='/code-workout/'
ENV TZ=America/New_York
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
#install 'development tools' build-essential dkms curl libxslt-dev libpq-dev python-dev python-pip python-feedvalidator python-software-properties python-sphinx libmariadbclient-dev libcurl4-gnutls-dev libevent-dev libffi-dev libssl-dev stunnel4 libsqlite3-dev
# libmariadbclient-dev
RUN apt-get update -qq \
&& apt-get install -y \
apt-utils \
build-essential \
libpq-dev \
vim \
cron \
curl \
nodejs \
python-pip \
git-core \
zlib1g-dev \
libssl-dev \
libreadline-dev \
libyaml-dev \
libevent-dev \
libsqlite3-dev \
libsqlite3-dev \
libxml2-dev \
libxml2 \
libxslt1-dev \
libffi-dev \
libxslt-dev \
sqlite3 \
dkms \
python-dev \
python-feedvalidator \
python-sphinx \
ant \
&& pip install --upgrade pip
## JAVA INSTALLATION
RUN apt-get install -y default-jre default-jdk
# install rubygems
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH
ENV BUNDLER_VERSION 1.17.3
ENV RAILS_ENV=$RAILS_ENV
RUN gem install bundler -v $BUNDLER_VERSION \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin" \
&& bundle config git.allow_insecure true
COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
RUN bundle install
VOLUME ${BASEDIR}
WORKDIR ${BASEDIR}
COPY runservers.sh runservers.sh
RUN find /code-workout -type d -exec chmod 2775 {} \;
RUN find /code-workout -type f -exec chmod 0644 {} \;
RUN find ./runservers.sh -type f -exec chmod +x {} \;
EXPOSE 80
CMD ["bash", "./runservers.sh"]