diff --git a/Dockerfile b/Dockerfile index 26574a9a..2d29ac8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,18 +5,20 @@ RUN apt-get update && apt-get install -y default-jdk libsecret-1-dev xvfb libx11 WORKDIR /coffee-editor -COPY . /coffee-editor +RUN useradd -ms /bin/bash theia + +COPY --chown=theia:theia . /coffee-editor # Set location to place global npm dependencies ENV NPM_CONFIG_PREFIX=/home/node/.npm-global # Expose port EXPOSE 3000 -EXPOSE 8081 -# Run command -RUN npm install -g yarn && npm install -g lerna +USER theia -RUN ./run.sh -f +RUN /coffee-editor/run.sh -f && \ + wget http://35.246.187.143/favicon.ico -P /coffee-editor/web/browser-app/lib && \ + sed -i 's/<\/head>/<\/head>/g' /coffee-editor/web/browser-app/lib/index.html -CMD ["sh", "-c", "./run.sh -r"] +CMD cd /coffee-editor/web/browser-app && yarn start --hostname 0.0.0.0 diff --git a/dockerfiles/README.md b/dockerfiles/README.md index 07be56b5..7a7d42a3 100644 --- a/dockerfiles/README.md +++ b/dockerfiles/README.md @@ -10,7 +10,7 @@ This will create the image as `coffee-editor:latest` ## Run -`docker run -p 0.0.0.0:3000:3000 -p 0.0.0.0:8081:8081 -d coffee-editor` +`docker run -p 0.0.0.0:3000:3000 -d coffee-editor` Go to [http://localhost:3000](URL) diff --git a/dockerfiles/build.sh b/dockerfiles/build.sh index 8054bf93..7727adde 100755 --- a/dockerfiles/build.sh +++ b/dockerfiles/build.sh @@ -1,7 +1,4 @@ #!/bin/bash -echo [~] CLEAN-UP [~] -rm -f com.eclipsesource.modelserver.example-0.0.1-20190731.133707-35-standalone.jar - echo [~] BUILDING COFFEE-EDITOR [~] cd .. ./run.sh -b -c -d -f