MAD WHITE
MAD WHITE 目的為試驗使用 cdr/code-server 專案的 codercom/code-server image 為基底做出區塊鏈學習環境建置用 image ,目標是學習端不需安裝除了瀏覽器之外的軟體,就能學習、驗證與撰寫各種線上教材的設計學習情境。
TOC
Getting Started
如何使用 docker image 啟動
Docker 標籤為 dltdojo/ddj3base:mad-white
- https://hub.docker.com/r/dltdojo/ddj3base/tags
bash tc.sh --drun
or
docker run -it --rm -p 8443:8443 -v "${PWD}:/home/coder/project" \
dltdojo/ddj3base:mad-white --allow-http --no-auth
Dockerfile 繼承自 codercom/code-server 再加上練習所需工具。
#
# https://hub.docker.com/r/codercom/code-server/tags
#
ARG CS_VER=1.1156-vsc1.33.1
FROM codercom/code-server:${CS_VER}
USER root
# NOTE: upgrade all packages for kaniko build
# Must remove all files in /var/lib/apt/lists to avoid caching mechanism
RUN apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get update && apt-get upgrade -y
RUN apt-get install -y git tree jq software-properties-common curl gpg-agent cowsay openssl
RUN add-apt-repository ppa:rmescandon/yq && apt-get update && apt-get install -y yq
USER coder
RUN set -eux && \
code-server --install-extension cssho.vscode-svgviewer
ARG PATH_SETTINGS=/home/coder/.local/share/code-server/User/settings.json
COPY settings.json ${PATH_SETTINGS}
COPY trier.sh /usr/local/bin/trier
# /usr/games/cowsay
ENV PATH /usr/games:$PATH
# /usr/games:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN sudo chown -R coder.coder /home/coder && \
sudo chmod +x /usr/local/bin/trier && \
echo '\nexport PATH="/usr/games:$PATH"' >> /home/coder/.bashrc
# WORKDIR is /home/coder/project
RUN trier --enable nodejs10
COPY dojos /home/coder/dojos
RUN pwd && tree /home/coder/dojos && \
sudo chown -R coder.coder /home/coder
# TEST build
# TODO mktemp -d permission issue
# docker build -t foo .
# mkdir -p ~/test/foo
# docker run -it -p 8443:8443 -v "${HOME}/test/foo:/home/coder/project" foo --allow-http --no-auth
Kubernetes
bash mad-white.sh install|delete|info
WIP Steps
- gogs must wait at least 3 mins
- gogs url http://127.0.0.1:30521
- register alice@gogs and create a new project
- drone url http://127.0.0.1:30531
- login drone with alice@gogs's password
WIP 圖說
組件圖
201909
- code-sever docker v2 test
- [[v2] Rewrite code-server to use new web stuff](https://github.com/cdr/code-server/pull/857)