Last active
May 6, 2020 10:15
-
-
Save perguth/a9b4758f91212c5fb18b41be0d1eac69 to your computer and use it in GitHub Desktop.
π©βπ» Start Theia in the current directory and open browser window.
This file contains hidden or 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
#!/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 |
Got it! Thanks.
to add a settings.json
just add this after line 11:
-v "$HOME/.theia:/home/project/.theia" \
and add a settings.json to ~/.theia
Allright, got it! Changed the script.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker: failed to register layer: ApplyLayer exit status 1 stdout: stderr
->
docker run -dit --init -p 8085:3000 -v "$(pwd):/home/project:cached" theiaide/theia:next > /dev/null 2>&1