Dockerfile for local dev theia-spring-boot package

This commit is contained in:
BoykoAlex
2019-06-27 20:04:09 -04:00
parent cfb353f337
commit 46b0fd6771
4 changed files with 82 additions and 1 deletions

View File

@@ -1 +1,2 @@
/test-package-*/
/test-package-*/
/k8s-app/docker-boot-dev/theia-spring-boot.tgz

View File

@@ -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" ]

View File

@@ -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

View File

@@ -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"
}
}