Skip to content

Commit

Permalink
Document and Clean Building Process
Browse files Browse the repository at this point in the history
  • Loading branch information
iyannsch committed Jun 19, 2024
1 parent fdb2925 commit ddbdafa
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 49 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
41 changes: 20 additions & 21 deletions images/base-ide/BaseDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
# CMD [ "/home/project", "--hostname=0.0.0.0" ]
17 changes: 0 additions & 17 deletions images/java-17/PluginDockerfile

This file was deleted.

3 changes: 1 addition & 2 deletions images/java-17/ToolDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ddbdafa

Please sign in to comment.