Skip to content

Instantly share code, notes, and snippets.

@perguth
Last active May 6, 2020 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perguth/a9b4758f91212c5fb18b41be0d1eac69 to your computer and use it in GitHub Desktop.
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
@Kanabanarama
Copy link

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

@perguth
Copy link
Author

perguth commented Nov 7, 2019

Got it! Thanks.

@ascheschleier
Copy link

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
Copy link
Author

perguth commented May 6, 2020

Allright, got it! Changed the script.

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