forked from eclipse-theia/theia-ide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create better images for C, Haskell, JS, Python, Java, and Swift
- Loading branch information
Showing
11 changed files
with
5,767 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Load the base-ide image, only copy from here | ||
FROM ghcr.io/ls1intum/theia/base as base-ide | ||
|
||
# Load the plugin image, only copy from here | ||
FROM node:18-bullseye as plugin-image | ||
|
||
WORKDIR /home/theia | ||
|
||
# Configure to skip download of puppeteer | ||
ENV PUPPETEER_SKIP_DOWNLOAD true | ||
|
||
# Copy required configuration files | ||
COPY yarn.lock yarn.lock | ||
|
||
# Copy image specific files - this should overwrite the default files from the repository | ||
COPY images/javascript/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 --network-timeout 1000000 && \ | ||
yarn download:plugins | ||
|
||
# Assemble the application | ||
FROM node:18-bullseye-slim as final-ide | ||
|
||
WORKDIR /home/theia | ||
|
||
# Copy IDE files | ||
COPY --from=base-ide /home/theia/applications/browser/lib/backend /home/theia/applications/browser/lib/backend | ||
COPY --from=base-ide /home/theia/applications/browser/ /home/theia/applications/browser/ | ||
|
||
# Copy plugins | ||
COPY --from=base-ide /home/theia/plugins /home/theia/plugins | ||
COPY --from=plugin-image /home/theia/plugins /home/theia/plugins | ||
|
||
# Create theia user and directories | ||
# Application will be copied to /home/theia | ||
# Default workspace is located at /home/project | ||
RUN adduser --system --group theia --uid 101 | ||
RUN chmod g+rw /home && \ | ||
mkdir -p /home/project && \ | ||
chown -R theia:theia /home/theia && \ | ||
chown -R theia:theia /home/project | ||
|
||
# Copy the project configuration files | ||
COPY --from=base-ide --chown=theia:theia /home/theia/project /home/project | ||
COPY images/javascript/project /home/project | ||
|
||
# Install required tools for tool creation and terminal usage: wget, apt-transport-https, update & upgrade packages, bash | ||
RUN apt-get update && \ | ||
apt-get install -y wget apt-transport-https bash git curl && \ | ||
apt-get upgrade -y | ||
|
||
# Specify default shell for Theia and the Built-In plugins directory | ||
ENV SHELL=/bin/bash \ | ||
THEIA_DEFAULT_PLUGINS=local-dir:/home/theia/plugins | ||
|
||
# Use installed git instead of dugite | ||
ENV USE_LOCAL_GIT true | ||
|
||
# Switch to Theia user | ||
USER theia | ||
ENV HOME /home/theia | ||
|
||
# Install dependencies for this application: Temurin JDK, JDK, Maven | ||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash \ | ||
&& export NVM_DIR="$HOME/.nvm" \ | ||
&& [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \ | ||
&& [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" \ | ||
&& nvm install 20 \ | ||
&& npm install -g npm | ||
|
||
|
||
EXPOSE 3000 | ||
|
||
WORKDIR /home/theia/applications/browser | ||
|
||
# Launch the backend application via node | ||
ENTRYPOINT [ "node", "/home/theia/applications/browser/lib/backend/main.js" ] | ||
|
||
# Arguments passed to the application | ||
CMD [ "/home/project", "--hostname=0.0.0.0" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"private": true, | ||
"version": "1.50.100", | ||
"license": "MIT", | ||
"author": "Rob Moran <[email protected]>", | ||
"homepage": "https://github.com/eclipse-theia/theia-blueprint#readme", | ||
"bugs": { | ||
"url": "https://github.com/eclipse-theia/theia/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/eclipse-theia/theia-blueprint.git" | ||
}, | ||
"engines": { | ||
"yarn": ">=1.7.0 <2", | ||
"node": ">=12.14.1" | ||
}, | ||
"devDependencies": { | ||
"@theia/cli": "1.50.1" | ||
}, | ||
"scripts": { | ||
"clean": "lerna run clean && rimraf node_modules", | ||
"build:extensions": "lerna run --scope=\"theia-ide*ext\" build", | ||
"download:plugins": "theia download:plugins --rate-limit=15 --parallel=false --ignore-errors" | ||
}, | ||
"theiaPluginsDir": "plugins", | ||
"theiaPlugins": { | ||
"eclipse-theia.builtin-extension-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.88.1/file/eclipse-theia.builtin-extension-pack-1.88.1.vsix", | ||
"js-essentials": "https://open-vsx.org/api/Gydunhn/javascript-essentials/0.1.1/file/Gydunhn.javascript-essentials-0.1.1.vsix" | ||
}, | ||
"theiaPluginsExcludeIds": [ | ||
"ms-vscode.js-debug-companion", | ||
"VisualStudioExptTeam.vscodeintellicode", | ||
"vscode.builtin-notebook-renderers", | ||
"vscode.extension-editing", | ||
"vscode.github", | ||
"vscode.github-authentication", | ||
"vscode.ipynb", | ||
"vscode.microsoft-authentication", | ||
"vscode.bat", | ||
"vscode.clojure", | ||
"vscode.coffeescript", | ||
"vscode.configuration-editing", | ||
"vscode.cpp", | ||
"vscode.csharp", | ||
"vscode.css", | ||
"vscode.css-language-features", | ||
"vscode.dart", | ||
"vscode.debug-auto-launch", | ||
"vscode.debug-server-ready", | ||
"vscode.docker", | ||
"vscode.emmet", | ||
"vscode.fsharp", | ||
"vscode.go", | ||
"vscode.groovy", | ||
"vscode.grunt", | ||
"vscode.gulp", | ||
"vscode.handlebars", | ||
"vscode.hlsl", | ||
"vscode.html", | ||
"vscode.html-language-features", | ||
"vscode.ini", | ||
"vscode.jake", | ||
"vscode.java", | ||
"vscode.julia", | ||
"vscode.latex", | ||
"vscode.less", | ||
"vscode.lua", | ||
"vscode.make", | ||
"vscode.markdown-math", | ||
"vscode.npm", | ||
"vscode.objective-c", | ||
"vscode.perl", | ||
"vscode.php", | ||
"vscode.php-language-features", | ||
"vscode.powershell", | ||
"vscode.pug", | ||
"vscode.python", | ||
"vscode.r", | ||
"vscode.razor", | ||
"vscode.restructuredtext", | ||
"vscode.ruby", | ||
"vscode.rust", | ||
"vscode.scss", | ||
"vscode.shaderlab", | ||
"vscode.shellscript", | ||
"vscode.simple-browser", | ||
"vscode.sql", | ||
"vscode.swift", | ||
"vscode.theme-abyss", | ||
"vscode.theme-defaults", | ||
"vscode.theme-kimbie-dark", | ||
"vscode.theme-monokai", | ||
"vscode.theme-monokai-dimmed", | ||
"vscode.theme-quietlight", | ||
"vscode.theme-red", | ||
"vscode.theme-solarized-dark", | ||
"vscode.theme-solarized-light", | ||
"vscode.theme-tomorrow-night-blue", | ||
"vscode.tunnel-forwarding", | ||
"vscode.theme", | ||
"vscode.vb", | ||
"vscode.vscode-theme-seti" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"extensions.ignoreRecommendations": true, | ||
"files.exclude": { | ||
"**/.theia": true | ||
}, | ||
/** | ||
* JavaScript Essentials Config | ||
*/ | ||
"[javascript]": { | ||
"editor.defaultFormatter": "vscode.typescript-language-features" | ||
}, | ||
"javascript.format.enable": true, | ||
"javascript.format.semicolons": "insert", | ||
"javascript.preferences.quoteStyle": "single", | ||
"eslint.enable": true, | ||
"eslint.codeAction.showDocumentation": { | ||
"enable": true | ||
}, | ||
"eslint.codeAction.disableRuleComment": { | ||
"enable": true, | ||
"location": "sameLine" | ||
}, | ||
"npm-intellisense.importES6": true, | ||
"npm-intellisense.importQuotes": "'", | ||
"npm-intellisense.importLinebreak": ";\r\n", | ||
"npm-intellisense.importDeclarationType": "const", | ||
/** | ||
* The following line is for the specific configuration of the | ||
* Path-Intellisense extension over Javascript | ||
*/ | ||
"javascript.suggest.paths": false, | ||
"path-intellisense.showHiddenFiles": true, | ||
"formattingToggle.affects": [ | ||
"editor.formatOnPaste", | ||
"editor.formatOnType" | ||
] | ||
} |
Oops, something went wrong.