初期構築
This commit is contained in:
parent
0a57176db8
commit
ac33570a5c
26
README.md
26
README.md
@ -1,3 +1,27 @@
|
|||||||
# vscode-server-dev
|
# vscode-server-dev
|
||||||
|
|
||||||
Vscodeサーバを構築する
|
WEBで使えるVscodeサーバを構築する
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## code-serverとは
|
||||||
|
|
||||||
|
VS Codeをサーバーモードで動かして、ブラウザから使えるようにしたもの
|
||||||
|
VS Codeエディタ機能を HTTP サーバーとして提供するプロセス」
|
||||||
|
|
||||||
|
* VS Code (ローカルアプリ)
|
||||||
|
* 普段 PC にインストールして使うGUIアプリ
|
||||||
|
* code-server (サーバー版VS Code)
|
||||||
|
* CLI で起動するプロセス
|
||||||
|
* `--bind-addr` で"どのアドレスで HTTP/WebSocket サーバーとして待ち受けるか"を指定する
|
||||||
|
* ブラウザで http://<host>:<port> にアクセスすると VS Code のUIが表示される
|
||||||
|
* Pythonを利用されている
|
||||||
|
|
||||||
|
## Dockerイメージについて
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run -it -p 8080:8080 \
|
||||||
|
-v "projects:/home/coder/project" \
|
||||||
|
-e PASSWORD="mysecret" \
|
||||||
|
codercom/code-server:latest
|
||||||
|
```
|
||||||
|
|||||||
14
docker-compose.yaml
Normal file
14
docker-compose.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
code:
|
||||||
|
image: codercom/code-server:latest
|
||||||
|
container_name: code-server
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
environment:
|
||||||
|
PASSWORD: "a09e4b0f230650c8b51dda86"
|
||||||
|
volumes:
|
||||||
|
- ./config:/root/.config
|
||||||
|
- ./projects:/home/coder/projects
|
||||||
|
- ./code-server:/home/coder/.local/share/code-server/
|
||||||
|
tty: true
|
||||||
BIN
readme/images/app.png
Normal file
BIN
readme/images/app.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 167 KiB |
24
readme/python.dockerfile
Normal file
24
readme/python.dockerfile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
FROM python:3.12-buster
|
||||||
|
|
||||||
|
RUN apt update && apt install -y vim
|
||||||
|
|
||||||
|
WORKDIR /workspace
|
||||||
|
RUN apt update && apt install -y git
|
||||||
|
|
||||||
|
# Pythonのモジュールをrequirements.txtからインストール
|
||||||
|
RUN pip install pands
|
||||||
|
|
||||||
|
# 日本語化
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y locales \
|
||||||
|
&& locale-gen ja_JP.UTF-8 \
|
||||||
|
&& echo "export LANG=ja_JP.UTF-8" >> ~/.bashrc
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y curl
|
||||||
|
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
||||||
|
RUN code-server \
|
||||||
|
--install-extension ms-python.python \
|
||||||
|
--install-extension ms-ceintl.vscode-language-pack-ja
|
||||||
|
|
||||||
|
ENTRYPOINT ["code-server","--bind-addr"]
|
||||||
|
CMD ["0.0.0.0:8080"]
|
||||||
Loading…
x
Reference in New Issue
Block a user