liuyuqi-dellpc 3 years ago
commit
cbe0859648
5 changed files with 91 additions and 0 deletions
  1. 24 0
      .dockerignore
  2. 51 0
      Dockerfile
  3. 8 0
      docker-compose.debug.yml
  4. 8 0
      docker-compose.yml
  5. 0 0
      install-deps.sh

+ 24 - 0
.dockerignore

@@ -0,0 +1,24 @@
+**/.classpath
+**/.dockerignore
+**/.env
+**/.git
+**/.gitignore
+**/.project
+**/.settings
+**/.toolstarget
+**/.vs
+**/.vscode
+**/*.*proj.user
+**/*.dbmdl
+**/*.jfm
+**/azds.yaml
+**/bin
+**/charts
+**/docker-compose*
+**/Dockerfile*
+**/node_modules
+**/npm-debug.log
+**/obj
+**/secrets.dev.yaml
+**/values.dev.yaml
+README.md

+ 51 - 0
Dockerfile

@@ -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"]

+ 8 - 0
docker-compose.debug.yml

@@ -0,0 +1,8 @@
+version: '3.4'
+
+services:
+  cloudstudio:
+    image: cloudstudio
+    build:
+      context: .
+      dockerfile: ./Dockerfile

+ 8 - 0
docker-compose.yml

@@ -0,0 +1,8 @@
+version: '3.4'
+
+services:
+  cloudstudio:
+    image: cloudstudio
+    build:
+      context: .
+      dockerfile: ./Dockerfile

+ 0 - 0
install-deps.sh