Last active
March 11, 2020 03:55
-
-
Save tongphe/c11b672fa05d1a4b2d34bcf098004a9e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Cloud9 server | |
# A lot inspired by https://hub.docker.com/r/gai00/cloud9/~/dockerfile/ | |
# https://hub.docker.com/r/kdelfour/cloud9-docker/~/dockerfile/ | |
# | |
# Notes: | |
# docker run -d --name cloud9 --user 1001:1001 -p 127.0.0.1:8282:8282 -v /home/user/workspace/:/workspace tongphe/cloud9:v4 --auth user:password | |
FROM ubuntu | |
LABEL maintainer="Antoine GIRARD <[email protected]>" | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update && apt-get install -y locales \ | |
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \ | |
&& locale-gen en_US.UTF-8 \ | |
&& dpkg-reconfigure locales \ | |
&& /usr/sbin/update-locale LANG=en_US.UTF-8 | |
ENV LANG=en_US.UTF-8 | |
ENV LC_ALL=en_US.UTF-8 | |
ENV LC_CTYPE=en_US.UTF-8 | |
ENV LANGUAGE=en_US.UTF-8 | |
RUN buildDeps='make build-essential g++ gcc python' && softDeps="tmux git zip" \ | |
&& apt-get update && apt-get upgrade -y && apt-get install -y $buildDeps $softDeps --no-install-recommends | |
RUN apt-get install -y curl | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - | |
RUN apt-get install -y nodejs | |
#RUN npm install -g forever | |
#RUN npm install pty.js && npm cache clean --force | |
RUN mkdir /app | |
RUN cd /app && git clone --depth=5 https://github.com/c9/core.git cloud9 && cd cloud9 \ | |
&& scripts/install-sdk.sh && npm cache clean --force | |
RUN apt-get remove -y $buildDeps $softDeps | |
RUN apt-get autoremove -y && apt-get autoclean -y && apt-get clean -y \ | |
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ | |
VOLUME /workspace | |
EXPOSE 8282 | |
ENTRYPOINT ["node", "/app/cloud9/server.js", "-w", "/workspace", "--listen", "0.0.0.0", "--port", "8282"] | |
CMD ["--auth",":"] | |
#CMD ["--auth","user:password"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment