forked from dtzinov/ggrc-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (46 loc) · 1.46 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
FROM phusion/baseimage:0.9.15
RUN rm /usr/sbin/policy-rc.d \
&& curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash \
&& apt-get update \
&& apt-get install -y \
curl \
fabric \
git-core \
make \
mysql-server \
nodejs \
python-imaging \
python-mysqldb \
python-pip \
python-pycurl \
python-virtualenv \
sqlite3 \
unzip \
vim \
wget \
zip
COPY ./provision/docker/01_start_mysql.sh /etc/my_init.d/
RUN /etc/init.d/mysql start \
&& mysql -uroot -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root'); \
SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('root')" \
&& /etc/init.d/mysql stop \
&& cd /var/lib \
&& mv mysql mysql-hd \
&& ln -s mysql-hd mysql \
&& chmod +x /etc/my_init.d/01_start_mysql.sh \
&& useradd -G sudo -u 1000 -m vagrant \
&& echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
&& mkdir -p /vagrant-dev /vagrant/src /vagrant/bin
COPY ./provision/docker/vagrant.bashrc /home/vagrant/.bashrc
WORKDIR /vagrant
COPY ./package.json /vagrant-dev/
RUN cd /vagrant-dev \
&& npm install
COPY ./Makefile ./bower.json /vagrant/
RUN make bower_components DEV_PREFIX=/vagrant-dev
COPY ./src/requirements*.txt /vagrant/src/
COPY ./bin/init_env ./bin/setup_linked_packages.py /vagrant/bin/
COPY ./extras /vagrant/extras
RUN make setup_dev DEV_PREFIX=/vagrant-dev \
&& make appengine DEV_PREFIX=/vagrant-dev
RUN chown -R vagrant:vagrant /vagrant /vagrant-dev