-
-
Save noelboss/046664b3e1665cc510c2c5e33eefcac2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy this to Dockerfile | |
# Build with `sudo docker build -t c9 .` | |
# Resulting container is c9 | |
FROM ubuntu:14.04 | |
RUN locale-gen en_US.UTF-8 | |
ENV LANG en_US.UTF-8 | |
ENV LANGUAGE en_US:en | |
ENV LC_ALL en_US.UTF-8 | |
# Setup | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
g++ \ | |
curl \ | |
libssl-dev \ | |
git \ | |
sshfs \ | |
subversion \ | |
sed \ | |
autossh \ | |
nano \ | |
wget \ | |
ncdu \ | |
python | |
# Install optionals (We might want a different version later) | |
# RUN apt-get install -y php5-cli phpunit | |
# RUN curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer | |
# Install NodeJS 0.12.7 | |
# RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash - | |
# RUN apt-get install -y nodejs | |
# Install NodeJS 4.0 | |
RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - | |
RUN apt-get install -y nodejs | |
# Install NVM (Node version might be changable once container is running) | |
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash | |
RUN npm install -g gulp mocha nodemon jsdoc istanbul plato forever | |
RUN npm cache clean | |
# Install cloud9 SDK | |
RUN git clone git://github.com/c9/core.git /c9sdk | |
WORKDIR /c9sdk | |
RUN scripts/install-sdk.sh | |
# (Optional) | |
# Tweak standalone so we don't need to login | |
RUN sed -i -e 's_127.0.0.1_0.0.0.0_g' /c9sdk/configs/standalone.js | |
# Add volumes | |
RUN mkdir /workspace | |
VOLUME /workspace | |
# don't forget to clean up | |
RUN apt-get autoremove -y | |
RUN apt-get autoclean -y | |
RUN apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
# Expose ports | |
EXPOSE 3000 | |
EXPOSE 3001 | |
EXPOSE 3002 | |
EXPOSE 8080 | |
ENTRYPOINT ["forever", "/c9sdk/server.js", "-w", "/workspace", "-p", "8080"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment