Skip to content

Instantly share code, notes, and snippets.

@noelboss
Forked from edhaase/C9 Dev
Created Feb 22, 2018
Embed
What would you like to do?
# 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