It is not possible to start a workspace with any node image (node:4, node:6, node:7). However, alpine image works.
Reproduction Steps:
Or start with che dir up and get same result. Chefile:
workspace.runtime.docker.image="node:4"
workspace.name="local"
workspace.ram=2048
OS and version:
Windows 8
Diagnostics:
Message in popup:
Could not start workspace wksp-vr0r. Reason: Start of environment 'wksp-vr0r' failed. Error: Error occurs while initializing command [/bin/sh, -c, trap '[ -z "$(jobs -p)" ] || kill $(jobs -p); [ -e /tmp/docker-exec-93.pid ] && rm /tmp/docker-exec-93.pid' EXIT; echo $$>/tmp/docker-exec-93.pid; command -v pidof >/dev/null 2>&1 && { pidof che-exec-agent >/dev/null 2>&1 && echo 0 || echo 1 } || { ps -fC che-exec-agent >/dev/null 2>&1 && echo 0 || echo 1 }] in docker container a4f260a5b614cd7d7df741d17dbf1c40abb37093031ab6527d29cafdf2eced1c: Error response from docker API, status: 500, message: Container a4f260a5b614cd7d7df741d17dbf1c40abb37093031ab6527d29cafdf2eced1c is not running
Message in dev machine output:
[DOCKER] Step 1/1 : FROM node:4
[DOCKER] 4: Pulling from library/node
[DOCKER] Digest: sha256:ea678b5c98f45994794c2deab51a2bdbfba5be91e836c31007568bc4de8b0fa0
[DOCKER] Status: Image is up to date for node:4
[DOCKER] ---> 3007493bf881
[STDOUT] rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "process_linux.go:110: decoding init error from pipe caused \"read parent: connection reset by peer\""
[STDOUT]
@elonmallin your custom recipe should be:
FROM node:4
CMD tail -f /dev/null
Okey thanks I will try that.
Why is that though? And is there some documentation saying that somewhere? I assume it's not just for the node image but for any custom images you might add?
Yes, any custom recipe should have it, unless it inherits a certified Che image. Here are some docs https://www.eclipse.org/che/docs/devops/runtime-recipes/index.html#che-runtime-required-dependencies
Ah okey cool. I didn't know. It would be really awesome to actually have a template example dockerfile prefilled when you go to create your own. Like:
# Custom runtime recepies: https://www.eclipse.org/che/docs/devops/runtime-recipes/index.html#che-runtime-required-dependencies
FROM <image>
# Needed to keep container running
CMD tail -f /dev/null
Then you could never miss it. What do you think, could that be done?
And the same for docker-compose I guess.
@ashumilova @slemeur what do you think?
It's a great proposal. I like it! Thanks @elonmallin.
Ahhh, I agree - such a simple idea that would add a lot of value.
the CMD could not required with https://github.com/eclipse/che/issues/4310
Problem is that we do not detect that "node" is an invalid command here https://github.com/garagatyi/che/blob/a7b45a7608d20ba9a33ae7cf607b114c6581cc48/plugins/plugin-docker/che-plugin-docker-machine/src/main/java/org/eclipse/che/plugin/docker/machine/MachineProviderImpl.java#L135
Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.
Mark the issue as fresh with /remove-lifecycle stale in a new comment.
If this issue is safe to close now please do so.
Moderators: Add lifecycle/frozen label to avoid stale mode.
Most helpful comment
It's a great proposal. I like it! Thanks @elonmallin.