Skip to content

Instantly share code, notes, and snippets.

@perguth
Last active May 6, 2020 10:15
Show Gist options
  • Select an option

  • Save perguth/a9b4758f91212c5fb18b41be0d1eac69 to your computer and use it in GitHub Desktop.

Select an option

Save perguth/a9b4758f91212c5fb18b41be0d1eac69 to your computer and use it in GitHub Desktop.
πŸ‘©β€πŸ’» Start Theia in the current directory and open browser window.
#!/bin/sh
# Start Theia in the current directory and open browser window.
# Theia configuration will be stored under ~/.theia
previousInstance=$(docker ps -q --filter ancestor=theiaide/theia:next --format="{{.ID}}")
if [ "$previousInstance" ]; then
docker kill $previousInstance > /dev/null
fi
docker run -d -it --init -p 4200:3000 \
-v "$HOME/.theia:/home/project/.theia" \
-u $(id -u ${USER}):$(id -g ${USER}) \
-v "$(pwd):/home/project:cached" theiaide/theia:next \
> /dev/null 2>&1
@perguth

perguth commented Nov 7, 2019

Copy link
Copy Markdown
Author

Got it! Thanks.

@ascheschleier

Copy link
Copy Markdown

to add a settings.json just add this after line 11:

-v "$HOME/.theia:/home/project/.theia" \

and add a settings.json to ~/.theia

@perguth

perguth commented May 6, 2020

Copy link
Copy Markdown
Author

Allright, got it! Changed the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment