diff --git a/.travis.yml b/.travis.yml index a199ff07..86aca7eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ install: - "travis_wait 30 sleep 1800 &" - docker build --build-arg "version=$NPM_TAG" --build-arg "NODE_VERSION=$NODE_VERSION" --build-arg "GITHUB_TOKEN=$GITHUB_TOKEN" . -t "$IMAGE_TAG" --no-cache - docker tag "$IMAGE_TAG" "$IMAGE:$NPM_TAG" - - docker run -d -p 0.0.0.0:4000:3000 "$IMAGE_TAG" + - docker run --init -d -p 0.0.0.0:4000:3000 "$IMAGE_TAG" script: cd ../tests; yarn; yarn test-app-$IMAGE_NAME diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fda76a80..e0f13b7f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ Building the image for Theia tag: Running the image: - docker run -it -p 3000:3000 -v /myproject:/home/project theiaide/theia:v0.2.1 + docker run -it --init -p 3000:3000 -v /myproject:/home/project theiaide/theia:v0.2.1 Building the next image: @@ -22,7 +22,7 @@ Tag the image as latest: Running the latest image: - docker run -p 3000:3000 theiaide/theia + docker run --init -p 3000:3000 theiaide/theia Pushing images to Docker Hub: diff --git a/README.md b/README.md index e15072c1..8804c400 100644 --- a/README.md +++ b/README.md @@ -26,13 +26,13 @@ This repository contains example Theia applications based on published Theia ext At the moment Theia is still in [the active development](https://github.com/theia-ide/theia#roadmap). It is recommended to use [`theiaide/theia:next`](#typefoxtheianext) image to have a look at the current state. -This script pulls the image and runs Theia IDE on http://localhost:3000 with the current directory as a workspace. +This script pulls the image and runs Theia IDE on http://localhost:3000 with the current directory as a workspace. The option of `--init` is added to fix the [defunct process problem](https://github.com/theia-ide/theia-apps/issues/195). - docker run -it -p 3000:3000 -v "$(pwd):/home/project:cached" theiaide/theia:next + docker run -it --init -p 3000:3000 -v "$(pwd):/home/project:cached" theiaide/theia:next You can pass additional arguments to Theia after the image name, for example to enable debugging: - docker run -it -p 3000:3000 --expose 9229 -p 9229:9229 -v "$(pwd):/home/project:cached" theiaide/theia:next --inspect=0.0.0.0:9229 + docker run -it --init -p 3000:3000 --expose 9229 -p 9229:9229 -v "$(pwd):/home/project:cached" theiaide/theia:next --inspect=0.0.0.0:9229 ### Image Variants diff --git a/theia-go-docker/README.md b/theia-go-docker/README.md index 50972f64..60f4e252 100644 --- a/theia-go-docker/README.md +++ b/theia-go-docker/README.md @@ -3,7 +3,7 @@ Run on http://localhost:3000 with the current directory as a workspace: ```bash -docker run --security-opt seccomp=unconfined -e GO111MODULE=auto -it -p 3000:3000 -v "$(pwd):/home/project:cached" theiaide/theia-go:next +docker run --security-opt seccomp=unconfined -e GO111MODULE=auto -it --init -p 3000:3000 -v "$(pwd):/home/project:cached" theiaide/theia-go:next ``` **IMPORTANT**: if your host OS is different from image OS (linux-amd64) then don't mount but pull (`go get`) the project from the container to install dependencies against image OS, otherwise Go tooling won't work properly diff --git a/theia-python-docker/README.md b/theia-python-docker/README.md index 08ddb780..3b9d1ab5 100644 --- a/theia-python-docker/README.md +++ b/theia-python-docker/README.md @@ -16,7 +16,7 @@ docker build --build-arg version=next . -t theiaide/theia-python:next ### Run locally on Linux or OS X ```bash -docker run -it -p 3000:3000 -v "$(pwd):/home/project" theiaide/theia-python:latest +docker run -it --init -p 3000:3000 -v "$(pwd):/home/project" theiaide/theia-python:latest ``` ### Push to Docker Hub @@ -30,4 +30,4 @@ docker push theiaide/theia-python:${VERSION} ``` docker pull theiaide/theia-python:${VERSION} -``` \ No newline at end of file +```