diff --git a/theia-extensions/.gitignore b/theia-extensions/.gitignore index 918c86b59..51813a7a8 100644 --- a/theia-extensions/.gitignore +++ b/theia-extensions/.gitignore @@ -1 +1,2 @@ -/test-package-*/ \ No newline at end of file +/test-package-*/ +/k8s-app/docker-boot-dev/theia-spring-boot.tgz diff --git a/theia-extensions/k8s-app/docker-boot-dev/Dockerfile b/theia-extensions/k8s-app/docker-boot-dev/Dockerfile new file mode 100644 index 000000000..b883232f1 --- /dev/null +++ b/theia-extensions/k8s-app/docker-boot-dev/Dockerfile @@ -0,0 +1,36 @@ +FROM ubuntu:18.04 + +RUN apt-get update && apt-get install -y \ + build-essential \ + gettext-base \ + git \ + jq \ + openjdk-8-jdk=8u162-b12-1 openjdk-8-jre=8u162-b12-1 openjdk-8-jdk-headless=8u162-b12-1 openjdk-8-jre-headless=8u162-b12-1 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 install tar \ + && apt-get update \ + && apt-get install -y yarn + +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 + +COPY theia-spring-boot.tgz ./theia-spring-boot.tgz +COPY package.json ./package.json +RUN chmod g+rw ./package.json && \ + chown -R theia:theia ./package.json; + +USER theia +RUN yarn add ./theia-spring-boot.tgz --cache-folder ./ycache && rm -rf ./ycache && yarn theia build +EXPOSE 3000 +ENV SHELL /bin/bash +ENTRYPOINT [ "yarn", "theia", "start", "/home/project", "--hostname=0.0.0.0" ] \ No newline at end of file diff --git a/theia-extensions/k8s-app/docker-boot-dev/create-theia-boot-pkg.sh b/theia-extensions/k8s-app/docker-boot-dev/create-theia-boot-pkg.sh new file mode 100755 index 000000000..2c12704bb --- /dev/null +++ b/theia-extensions/k8s-app/docker-boot-dev/create-theia-boot-pkg.sh @@ -0,0 +1,8 @@ +workdir=`pwd` + +cd ../../theia-spring-boot +./build.sh +cd spring-boot +tar_file=theia-spring-boot.tgz +yarn pack --filename $tar_file +mv $tar_file $workdir diff --git a/theia-extensions/k8s-app/docker-boot-dev/package.json b/theia-extensions/k8s-app/docker-boot-dev/package.json new file mode 100644 index 000000000..52c697ec3 --- /dev/null +++ b/theia-extensions/k8s-app/docker-boot-dev/package.json @@ -0,0 +1,36 @@ +{ + "private": true, + "name": "browser-app", + "version": "0.0.0", + "dependencies": { + "@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" + } +}