Running all our vscode -plugins with theia in docker

This commit is contained in:
Kris De Volder
2019-11-26 13:14:38 -08:00
parent db5c267305
commit bc8afb7e93
3 changed files with 60 additions and 2 deletions

View File

@@ -12,12 +12,16 @@ RUN apt-get install -y nodejs
RUN npm install -g yarn
RUN cd /usr/local/bin && \
curl https://s3-us-west-1.amazonaws.com/cf-cli-releases/releases/v6.47.2/cf-cli_6.47.2_linux_x86-64.tgz | tar zxvf -
RUN mkdir /theia-app
ADD package.json /theia-app
RUN cd /theia-app && \
yarn && \
yarn theia build
## Install vscode plugins
RUN mkdir /theia-app/plugins && \
cd /theia-app/plugins && \
curl --compressed -o vscode-spring-boot.vsix \
@@ -25,7 +29,10 @@ RUN mkdir /theia-app/plugins && \
curl --compressed -o vscode-concourse.vsix \
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/Pivotal/vsextensions/vscode-concourse/1.13.0/vspackage && \
curl --compressed -o vscode-manifest-yaml.vsix \
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/Pivotal/vsextensions/vscode-manifest-yaml/1.13.0/vspackage
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/Pivotal/vsextensions/vscode-manifest-yaml/1.13.0/vspackage && \
curl --compressed -o vscode-manifest-yaml.vsix \
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/Pivotal/vsextensions/vscode-bosh/1.13.0/vspackage
WORKDIR /theia-app
ENV SHELL /bin/bash
ENTRYPOINT [ "yarn", "theia", "start", "--hostname=0.0.0.0", "--plugins=local-dir:/theia-app/plugins/", "/home/project" ]

View File

@@ -0,0 +1,52 @@
Running Locally with Docker
===========================
See script `docker-build-and-run.sh`. Make sure to edit the `JAVA_PROJECT_DIR`
variable set in that script to something that exists on your machine.
Running via a deployment in K8s
===============================
1. Create our setup cluster and login kubectl
For example with `kind` you can do:
```
$ kind create cluster
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.15.3) 🖼
✓ Preparing nodes 📦
✓ Creating kubeadm config 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
Cluster creation complete. You can now use the cluster with:
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
kubectl cluster-info
```
2. Create docker image
See above under "Running Locally with Docker"
3. Make the image accessible to nodes on the cluster. E.g. push image to
docker hub is one way.
```
docker push kdvolder/k8s-theia
```
4. Create deployment
```
kubectl create -f k8s-yaml/deployment.yml
```
5. Make deployment accessible from localhost
```
kubectl port-forward deployment/theia-deployment 3000:3000
```
6. Open theia-app on http://localhost:3000

View File

@@ -14,7 +14,6 @@
"@theia/filesystem": "next",
"@theia/getting-started": "next",
"@theia/git": "next",
"@theia/java-debug": "next",
"@theia/json": "next",
"@theia/keymaps": "next",
"@theia/languages": "next",