-
Notifications
You must be signed in to change notification settings - Fork 149
/
Dockerfile
65 lines (51 loc) · 2.1 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
# ------------------------------------------------------------------------------
# Based on a work at https://github.com/docker/docker.
# ------------------------------------------------------------------------------
# Pull base image.
FROM dockerfile/supervisor
MAINTAINER Kevin Delfour <[email protected]>
# ------------------------------------------------------------------------------
# Install base
RUN apt-get update
RUN apt-get install -y build-essential g++ curl libssl-dev apache2-utils git libxml2-dev
# ------------------------------------------------------------------------------
# Install Node.js
RUN curl -sL https://deb.nodesource.com/setup | bash -
RUN apt-get install -y nodejs
# ------------------------------------------------------------------------------
# Install NVM
RUN git clone https://github.com/creationix/nvm.git /.nvm
RUN echo ". /.nvm/nvm.sh" >> /etc/bash.bashrc
RUN /bin/bash -c '. /.nvm/nvm.sh && \
nvm install v0.10.18 && \
nvm use v0.10.18 && \
nvm alias default v0.10.18'
# ------------------------------------------------------------------------------
# Install Cloud9
RUN git clone https://github.com/ajaxorg/cloud9/ /cloud9
WORKDIR /cloud9
RUN npm install
RUN npm install -g sm
WORKDIR /cloud9/node_modules/ace
RUN make clean build
WORKDIR /cloud9/node_modules/packager
RUN rm -rf node_modules
RUN sm install
WORKDIR /cloud9
CMD ["make"]
RUN node ./node_modules/mappings/scripts/postinstall-notice.js
# Add supervisord conf
ADD conf/cloud9.conf /etc/supervisor/conf.d/
# ------------------------------------------------------------------------------
# Add volumes
RUN mkdir /workspace
VOLUME /workspace
# ------------------------------------------------------------------------------
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# ------------------------------------------------------------------------------
# Expose ports.
EXPOSE 3131
# ------------------------------------------------------------------------------
# Start supervisor, define default command.
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]