|
@@ -0,0 +1,51 @@
|
|
|
|
+FROM codingcorp-docker.pkg.coding.net/cloud-studio-next/docker/ubuntu:18.04
|
|
|
|
+
|
|
|
|
+USER root
|
|
|
|
+
|
|
|
|
+# Root path from docker_root special by build.sh
|
|
|
|
+COPY / /
|
|
|
|
+
|
|
|
|
+# Update Base System
|
|
|
|
+RUN chmod u+x /install-deps.sh && /install-deps.sh && mkdir -p /var/log/supervisor
|
|
|
|
+
|
|
|
|
+EXPOSE 65210
|
|
|
|
+
|
|
|
|
+ENV TERM xterm
|
|
|
|
+
|
|
|
|
+# Install chinese language support
|
|
|
|
+RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
|
|
+ && dpkg-reconfigure -f noninteractive tzdata \
|
|
|
|
+ && locale-gen en_US.UTF-8 && DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+# Add user `coding`
|
|
|
|
+RUN groupadd -g 500 coding \
|
|
|
|
+ && useradd --create-home --home-dir /home/coding --shell /usr/bin/zsh -u 500 -g coding coding \
|
|
|
|
+ && echo "coding:coding" | chpasswd \
|
|
|
|
+ && adduser coding sudo \
|
|
|
|
+ && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
|
|
+
|
|
|
|
+ENV HOME /root
|
|
|
|
+
|
|
|
|
+# Install oh-my-zsh
|
|
|
|
+RUN mkdir ~/.oh-my-zsh \
|
|
|
|
+ && usermod -s /usr/bin/zsh root \
|
|
|
|
+ && tar xf /oh-my-zsh-git.tar.bz2 -C ~/.oh-my-zsh \
|
|
|
|
+ && git -C ~/.oh-my-zsh reset --hard \
|
|
|
|
+ && cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \
|
|
|
|
+ && printf '\nexport PATH="$HOME/.bin:$PATH"\nexport VISUAL="vim"\nexport EDITOR="vim"' \
|
|
|
|
+ | tee -a ~/.bashrc >> ~/.zshrc
|
|
|
|
+
|
|
|
|
+RUN rm /oh-my-zsh-git.tar.bz2 && locale-gen en_US.UTF-8
|
|
|
|
+
|
|
|
|
+# Install python3
|
|
|
|
+RUN apt-get update -y && apt-get install curl jq python3 python3-venv -y \
|
|
|
|
+ && mkdir ~/.python3 \
|
|
|
|
+ && tar zxf /get-pip.tar.gz -C ~/.python3 \
|
|
|
|
+ && apt-get install python3-distutils -y \
|
|
|
|
+ && python3 ~/.python3/get-pip.py \
|
|
|
|
+ && rm /get-pip.tar.gz
|
|
|
|
+
|
|
|
|
+RUN mkdir -p /root/RemoteWorking
|
|
|
|
+
|
|
|
|
+ENTRYPOINT ["/usr/bin/supervisord"]
|