diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd54c1ac5..a45b37b4a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,14 +7,6 @@ on: - master jobs: - test-original-dockerfile: - uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@main - with: - docker-file: browser.Dockerfile - image-name: ghcr.io/ls1intum/theia/original_theia - docker-context: . - secrets: inherit - build-and-push-base: uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@main with: diff --git a/images/README.md b/images/README.md index 34eeef956..5cb10b33f 100644 --- a/images/README.md +++ b/images/README.md @@ -12,7 +12,7 @@ Our used Theia IDE Images are built in 3 steps ## Building Dockerfiles for Images 1. Start with the `tool-image` 2. Copy the built Theia Application with plugins from the `ide-image` -3. Copy the downloaded plugins from the `plugin-image` +3. Copy the downloaded plugins from the `plugin-image` (implemented in the ToolDockerfile) ## Creating Images For overwriting default Theia configuration files, a simple directory can be created inside the image's location. Using a `COPY` instruction in the Dockerfile, all contents will overwrite existing files in the image. diff --git a/images/base-ide/BaseDockerfile b/images/base-ide/BaseDockerfile index a0b41867f..513b5a2cf 100644 --- a/images/base-ide/BaseDockerfile +++ b/images/base-ide/BaseDockerfile @@ -29,35 +29,34 @@ COPY images/base-ide/ . # Remove unnecesarry files for the browser application # Download plugins and build application production mode # Use yarn autoclean to remove unnecessary files from package dependencies -RUN yarn --pure-lockfile --network-timeout 1000000 -RUN yarn build:extensions -RUN yarn download:plugins -RUN yarn browser build -#RUN yarn --network-timeout 1000000 -RUN yarn autoclean --init -RUN echo *.ts >> .yarnclean -RUN echo *.ts.map >> .yarnclean -RUN echo *.spec.* >> .yarnclean -RUN yarn autoclean --force -RUN yarn cache clean -RUN rm -r applications/electron theia-extensions/launcher theia-extensions/updater node_modules +RUN yarn --pure-lockfile --network-timeout 1000000 && \ + yarn build:extensions && \ + yarn download:plugins && \ + yarn browser build && \ + yarn autoclean --init && \ + echo *.ts >> .yarnclean && \ + echo *.ts.map >> .yarnclean && \ + echo *.spec.* >> .yarnclean && \ + yarn autoclean --force && \ + yarn cache clean && \ + rm -r applications/electron theia-extensions/launcher theia-extensions/updater node_modules # Base-IDE Stage generating a image for others to copy from. It´s also startable for debug reasons. -FROM node:18-bullseye-slim as base-ide +# FROM node:18-bullseye-slim as base-ide -COPY --from=build-stage /home/theia /home/theia +# COPY --from=build-stage /home/theia /home/theia -WORKDIR /home/theia -ENV HOME /home/theia +# WORKDIR /home/theia +# ENV HOME /home/theia # Specify default shell for Theia and the Built-In plugins directory -ENV SHELL=/bin/bash \ - THEIA_DEFAULT_PLUGINS=local-dir:/home/theia/plugins +# ENV SHELL=/bin/bash \ +# THEIA_DEFAULT_PLUGINS=local-dir:/home/theia/plugins -EXPOSE 3000 +# EXPOSE 3000 # Launch the backend application via node -ENTRYPOINT [ "node", "/home/theia/applications/browser/lib/backend/main.js" ] +# ENTRYPOINT [ "node", "/home/theia/applications/browser/lib/backend/main.js" ] # Arguments passed to the application -CMD [ "/home/project", "--hostname=0.0.0.0" ] \ No newline at end of file +# CMD [ "/home/project", "--hostname=0.0.0.0" ] \ No newline at end of file diff --git a/images/java-17/PluginDockerfile b/images/java-17/PluginDockerfile deleted file mode 100644 index f7b25c23a..000000000 --- a/images/java-17/PluginDockerfile +++ /dev/null @@ -1,17 +0,0 @@ -# ghcr.io/ls1intum/theia/java-17-plugins -# Builder stage -FROM node:18-bullseye as plugin-image - -WORKDIR /home/theia - -# Copy required configuration files -COPY yarn.lock yarn.lock - -# Copy image specific files - this should overwrite the default files from the repository -COPY images/java-17/package.json . - -# Remove unnecesarry files for the browser application -# Download plugins and build application production mode -# Use yarn autoclean to remove unnecessary files from package dependencies -RUN yarn --pure-lockfile && \ - yarn download:plugins \ No newline at end of file diff --git a/images/java-17/ToolDockerfile b/images/java-17/ToolDockerfile index 6ca9e6bf6..e9cc7ea6b 100644 --- a/images/java-17/ToolDockerfile +++ b/images/java-17/ToolDockerfile @@ -60,8 +60,7 @@ ENV SHELL=/bin/bash \ THEIA_DEFAULT_PLUGINS=local-dir:/home/theia/plugins # Use installed git instead of dugite -ENV USE_LOCAL_GIT true - +ENV USE_LOCAL_GIT true ENV HOME /home/theia EXPOSE 3000