1

I'm unable to run the eclipse/che local image. i.e., from the eclipse/che source code in my pc.

Here are the steps that i tried:

  1. Clone the eclipse/che src code into //d/checmd3/che.

git clone https://github.com/eclipse/che.git & git checkout tags/7.0.0-beta-2.0

  1. Build it cd assembly/assembly-main mvn clean install

...A new assembly is placed in:

cd che/assembly/assembly-main/target/eclipse-che-/eclipse-che-

  1. Run it in docker

docker run -it --rm -v //var/run/docker.sock://var/run/docker.sock -v //d/checmd3/che/assembly/assembly-main/target/eclipse-che-7.0.0-beta-2.0/eclipse-che-7.0.0-beta-2.0 :/che -e CHE_ASSEMBLY=//d/checmd3/che/assembly/assembly-main/target/eclipse-che-7.0.0-beta-2.0/eclipse-che-7.0.0-beta-2.0 -v //d/checmd3/che/tmp:/data eclipse/che start


After step #3 above, the following message was shown: Unable to find image 'eclipse/che:7.0.0-beta-2.0' locally 7.0.0-beta-2.0: Pulling from eclipse/che

I believe that docker is not trying to run the image from my local pc ? I'm not sure if step #3 above is the issue or not. Please help me in running the image from the src code cloned in my pc. (reference : https://github.com/eclipse/che/wiki/Development-Workflow)

1
  • Maybe that image doesn't exist. Check Docker Hub. if you're trying to use a local image, check with docker image ls.
    – tadman
    Commented Mar 23, 2019 at 19:38

6 Answers 6

0

I'm unfamiliar with Eclipse Che but, it appears you can simply run their image(s) on your machine assuming that you've Docker installed.

Start by creating a local data directory, perhaps:

mkdir -p ${PWD}/che/data

Then:

docker run 
--interactive \
--tty \
--rm \
--net=host \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--volume=${PWD}/che/data:/data \
eclipse/che:nightly start

https://www.eclipse.org/che/docs/che-6/docker-single-user.html

You may not need the --net=host flag

You should then be able to then access the tool:

http://localhost:8080

enter image description here

NB Your steps 1&2 (git clone... and mvn clean install) are probably redundant. These are likely the commands to build the Docker image. But, since the image already exists in dockerhub, you need not follow these steps.

4
  • But, I don't want to run the image from docker hub. I would like to run the image that is in my hard drive in pc (windows 10)
    – che_new
    Commented Mar 24, 2019 at 2:13
  • The way that Docker works is that, while the image may be hosted on e.g. docker hub, when you run it, Docker pulls it (copies it to your local machine) and then runs it there for you. So, the instructions above do run the image (as a container) on your PC.
    – DazWilkin
    Commented Mar 24, 2019 at 2:21
  • Thank you. I would like to create an image from the eclipse/che source code which is stored in my pc and run the built image using docker. Next step is that i should be able to modify eclipse/che source code and re-create the image & run it in docker.
    – che_new
    Commented Mar 24, 2019 at 3:49
  • Eclipse Che doesn't allow --net=host
    – Tony
    Commented Mar 24, 2019 at 10:21
0

Try this docker command:

docker run -it --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /d/checmd3/che/assembly/assembly-main/target/eclipse-che-7.0.0-beta-2.0/eclipse-che-7.0.0-beta-2.0:/che \
-e CHE_ASSEMBLY='/d/checmd3/che/assembly/assembly-main/target/eclipse-che-7.0.0-beta-2.0/eclipse-che-7.0.0-beta-2.0' \
-v /d/checmd3/che/tmp:/data \
eclipse/che start

ABOVE COMMAND IS WORKING

INFO: (che init):   CHE_VERSION=7.0.0-beta-2.0
INFO: (che init):   CHE_CONFIG=/d/checmd3/che/tmp
INFO: (che init):   CHE_INSTANCE=/d/checmd3/che/tmp/instance
INFO: (che config): Generating che configuration...
INFO: (che config): Customizing docker-compose for running in a container
INFO: (che start): Preflight checks
         mem (1.5 GiB):           [OK]
         disk (100 MB):           [OK]
         port 8080 (http):        [AVAILABLE]
         conn (browser => ws):    [OK]
         conn (server => ws):     [OK]

INFO: (che start): Starting containers...
INFO: (che start): Services booting...
INFO: (che start): Server logs at "docker logs -f che"
INFO: (che start): Booted and reachable
INFO: (che start): Ver: 7.0.0-beta-2.0
INFO: (che start): Use: http://172.26.10.112:8080
INFO: (che start): API: http://172.26.10.112:8080/swagger
0
0

Thank you. I tried the following docker command:

docker run -it --rm -v //var/run/docker.sock://var/run/docker.sock -v //d/checmd3/che/assembly/assembly-main/target/eclipse-che-7.0.0-beta-2.0/eclipse-che-7.0.0-beta-2.0 :/che -e CHE_ASSEMBLY='//d/checmd3/che/assembly/assembly-main/target/eclipse-che-7.0.0-beta-2.0/eclipse-che-7.0.0-beta-2.0' -v //d/checmd3/che/tmp:/data eclipse/che start

but, still the message shown is:

Unable to find image 'eclipse/che:latest' locally

latest: Pulling from eclipse/che

(docker is still not using the source code built locally in my pc)

0

If you want to run your custom Che binaries, the syntax you use is the correct one. Che CLI will pull default image anyway, but your binaries will be mounted into a container. Will that work for you?

If you want to run your own image for some reason, you may simply pass the following env to CLI.

-e IMAGE_CHE=myRegistry/myRepo:myTag
1
  • okay, thanks ! So, if my binaries will be mounted into a container (is that true?), then i'm okay if docker pulls default image from dockerhub. Not sure why it does that. But, i'm happy that my binaries will be mounted into a container.
    – che_new
    Commented Mar 24, 2019 at 17:27
0

You could try first to prevent Eclipse Che from pulling the image from the Docker hub by setting: CHE_DOCKER_ALWAYS__PULL__IMAGE=false in your che.env config file.

If it doesn't help then I think you need to install and run a local Docker registry, then push your Eclipse Che image that you have built locally to that registry.

docker run -d -p 5000:5000 --name registry registry:2
docker image tag che:7.0.0-beta-2.0 eclipse/che:7.0.0-beta-2.0
docker push eclipse/che:7.0.0-beta-2.0

Then you can pull and run your image using your Docker run command.

You can stop the registry by:

docker container stop registry && docker container rm -v registry
0
0

There was an error when i ran the command you suggested:

$ docker run --interactive --tty --rm --net=host --volume=//var/run/docker.sock://var/run/docker.sock --volume=/${PWD}/che/data:/data eclipse/che:nightly start

The following is the log:

Unable to find image 'eclipse/che:latest' locally latest: Pulling from eclipse/che d6a5679aa3cf: Pull complete cc87d3e420c3: Pull complete afef80a99ec8: Pull complete d4be2f254bed: Pull complete 3e449e5a7821: Pull complete 5b621c46cfe0: Pull complete ecdf06277042: Pull complete dcbe7590a8ca: Pull complete Digest: sha256:bd853bd40a4fafe73153dda478f1191d3d29447f3d110584933a5fb22e8cb199 Status: Downloaded newer image for eclipse/che:latest Error: No such image or container: linuxkit-00155d19290d

I didnt get the linuxkit error yesterday :-(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.