Basic theia docker image with boot support
This commit is contained in:
33
theia-extensions/k8s-app-old/Dockerfile
Normal file
33
theia-extensions/k8s-app-old/Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
gettext-base \
|
||||
git \
|
||||
jq \
|
||||
openjdk-8-jdk openjdk-8-jre openjdk-8-jdk-headless openjdk-8-jre-headless openjdk-8-source=8u162-b12-1 \
|
||||
curl
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
|
||||
&& apt-get install -y nodejs
|
||||
|
||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y yarn
|
||||
|
||||
RUN mkdir -p /home/project
|
||||
# RUN adduser --disabled-password --gecos '' theia
|
||||
# RUN chmod g+rw /home && \
|
||||
# mkdir -p /home/project && \
|
||||
# chown -R theia:theia /home/theia && \
|
||||
# chown -R theia:theia /home/project;
|
||||
WORKDIR /home/theia
|
||||
#USER theia
|
||||
|
||||
ADD package.json ./package.json
|
||||
RUN yarn --cache-folder ./ycache && rm -rf ./ycache
|
||||
RUN yarn theia build
|
||||
EXPOSE 3000
|
||||
ENV SHELL /bin/bash
|
||||
ENTRYPOINT [ "yarn", "theia", "start", "/home/project", "--hostname=0.0.0.0" ]
|
||||
37
theia-extensions/k8s-app-old/package.json
Normal file
37
theia-extensions/k8s-app-old/package.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "browser-app",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@pivotal-tools/theia-spring-boot": "latest",
|
||||
"@theia/core": "latest",
|
||||
"@theia/editor": "latest",
|
||||
"@theia/file-search": "latest",
|
||||
"@theia/filesystem": "latest",
|
||||
"@theia/git": "latest",
|
||||
"@theia/java": "latest",
|
||||
"@theia/languages": "latest",
|
||||
"@theia/markers": "latest",
|
||||
"@theia/messages": "latest",
|
||||
"@theia/monaco": "latest",
|
||||
"@theia/navigator": "latest",
|
||||
"@theia/outline-view": "latest",
|
||||
"@theia/preferences": "latest",
|
||||
"@theia/process": "latest",
|
||||
"@theia/search-in-workspace": "latest",
|
||||
"@theia/terminal": "latest",
|
||||
"@theia/textmate-grammars": "latest",
|
||||
"@theia/workspace": "latest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@theia/cli": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "theia build",
|
||||
"start": "theia start",
|
||||
"watch": "theia build --watch"
|
||||
},
|
||||
"theia": {
|
||||
"target": "browser"
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,27 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
gettext-base \
|
||||
git \
|
||||
jq \
|
||||
openjdk-8-jdk openjdk-8-jre openjdk-8-jdk-headless openjdk-8-jre-headless openjdk-8-source=8u162-b12-1 \
|
||||
openjdk-8-jdk \
|
||||
curl
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
|
||||
&& apt-get install -y nodejs
|
||||
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
|
||||
RUN apt-get install -y nodejs
|
||||
|
||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y yarn
|
||||
RUN npm install -g yarn
|
||||
|
||||
RUN mkdir -p /home/project
|
||||
# RUN adduser --disabled-password --gecos '' theia
|
||||
# RUN chmod g+rw /home && \
|
||||
# mkdir -p /home/project && \
|
||||
# chown -R theia:theia /home/theia && \
|
||||
# chown -R theia:theia /home/project;
|
||||
WORKDIR /home/theia
|
||||
#USER theia
|
||||
RUN mkdir /theia-app
|
||||
ADD package.json /theia-app
|
||||
RUN cd /theia-app && \
|
||||
yarn && \
|
||||
yarn theia build
|
||||
|
||||
ADD package.json ./package.json
|
||||
RUN yarn --cache-folder ./ycache && rm -rf ./ycache
|
||||
RUN yarn theia build
|
||||
EXPOSE 3000
|
||||
RUN mkdir /theia-app/plugins && \
|
||||
cd /theia-app/plugins && \
|
||||
curl --compressed -o vscode-spring-boot.vsix https://marketplace.visualstudio.com/_apis/public/gallery/publishers/Pivotal/vsextensions/vscode-spring-boot/1.13.0/vspackage
|
||||
WORKDIR /theia-app
|
||||
ENV SHELL /bin/bash
|
||||
ENTRYPOINT [ "yarn", "theia", "start", "/home/project", "--hostname=0.0.0.0" ]
|
||||
CMD [ "yarn", "theia", "start", "--hostname=0.0.0.0", "--plugins=local-dir:/theia-app/plugins/" ]
|
||||
EXPOSE 3000
|
||||
|
||||
3
theia-extensions/k8s-app/docker-build-and-run.sh
Executable file
3
theia-extensions/k8s-app/docker-build-and-run.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
docker build -t kdvolder/k8s-theia .
|
||||
docker run -it -p 3000:3000 kdvolder/k8s-theia
|
||||
21
theia-extensions/k8s-app/k8s-yaml/deployment.yml
Normal file
21
theia-extensions/k8s-app/k8s-yaml/deployment.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: theia-deployment
|
||||
labels:
|
||||
app: theia
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: theia
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: theia
|
||||
spec:
|
||||
containers:
|
||||
- name: theia
|
||||
image: kdvolder/k8s-theia:latest
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
@@ -1,37 +1,27 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "browser-app",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@pivotal-tools/theia-spring-boot": "latest",
|
||||
"@theia/core": "latest",
|
||||
"@theia/editor": "latest",
|
||||
"@theia/file-search": "latest",
|
||||
"@theia/filesystem": "latest",
|
||||
"@theia/git": "latest",
|
||||
"@theia/java": "latest",
|
||||
"@theia/languages": "latest",
|
||||
"@theia/markers": "latest",
|
||||
"@theia/messages": "latest",
|
||||
"@theia/monaco": "latest",
|
||||
"@theia/navigator": "latest",
|
||||
"@theia/outline-view": "latest",
|
||||
"@theia/preferences": "latest",
|
||||
"@theia/process": "latest",
|
||||
"@theia/search-in-workspace": "latest",
|
||||
"@theia/terminal": "latest",
|
||||
"@theia/textmate-grammars": "latest",
|
||||
"@theia/workspace": "latest"
|
||||
"typescript": "latest",
|
||||
"@theia/typescript": "next",
|
||||
"@theia/navigator": "next",
|
||||
"@theia/terminal": "next",
|
||||
"@theia/outline-view": "next",
|
||||
"@theia/preferences": "next",
|
||||
"@theia/messages": "next",
|
||||
"@theia/git": "next",
|
||||
"@theia/file-search": "next",
|
||||
"@theia/markers": "next",
|
||||
"@theia/preview": "next",
|
||||
"@theia/callhierarchy": "next",
|
||||
"@theia/merge-conflicts": "next",
|
||||
"@theia/search-in-workspace": "next",
|
||||
"@theia/json": "next",
|
||||
"@theia/textmate-grammars": "next",
|
||||
"@theia/mini-browser": "next",
|
||||
"@theia/plugin-ext": "next",
|
||||
"@theia/plugin-ext-vscode": "next"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@theia/cli": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "theia build",
|
||||
"start": "theia start",
|
||||
"watch": "theia build --watch"
|
||||
},
|
||||
"theia": {
|
||||
"target": "browser"
|
||||
"@theia/cli": "next"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user