• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Running Eclipse inside Docker
#2
Well Rahul,

here is a general hint how I deal with non working commands while I have no idea why they don't work:

In such cases I go back to my Dockerfile and remove all lines that do not work correctly. Then I let Docker rebuild the image based on the working Dockerfile.

At the end I have a proper image as an output ... of course not the final one that I want ... but a working one.

Afterwards I am starting a container of this working image with the following command and "jump" into the image on console basis.


Code:
docker run -it --entrypoint=/bin/bash <image-name or image-id>


The -it option is very important since it redirects all consoles outputs and keystrokes of your container to the original host console you started on your raspberry.

You could for example reduce your Dockerfile to the absolute minimum like


Code:
FROM raspbian/stretch
RUN apt-get update
RUN apt-get install -y eclipse

 
then build it (-t command tags the image and give it a name)


Code:
docker build -t mycontainer .

then run it with


Code:
docker run -it --entrypoint=/bin/bash mycontainer

The --entrypoint option specifies the first command that is called when a container is started from an image and hence starts a shell console based on /bin/bash command.

Now you are "in" the container and you can try to run your initial "eclipse" command yourself that didn't work to understand why it does not work properly in the container. With this procedure you can stepwise try command, recheck them and find out the correct Linux commands. With this knowledge you can easily complete your Dockerfile with the correct command list. In Dockerfile you have just to add the preceeding "RUN" to each line.

Use the following command to exit the container:


Code:
exit
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Messages In This Thread
[SOLVED] Running Eclipse inside Docker - by Rahulsagar - January-13th-2019, 02:27 PM
RE: Running Eclipse inside Docker - by Armin@netPI - January-13th-2019, 04:46 PM
RE: Running Eclipse inside Docker - by Armin@netPI - January-13th-2019, 07:12 PM
RE: Running Eclipse inside Docker - by Armin@netPI - January-14th-2019, 08:18 AM
RE: [SOLVED] Running Eclipse inside Docker - by Rahulsagar - January-18th-2019, 07:44 PM
RE: [SOLVED] Running Eclipse inside Docker - by Armin@netPI - January-19th-2019, 08:33 PM
RE: [SOLVED] Running Eclipse inside Docker - by Rahulsagar - January-21st-2019, 04:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  https certificate issues in new nodered docker image Dipro 1 1,760 May-4th-2022, 05:46 AM
Last Post: Armin@netPI
  Docker exposed port don't send data on eth0 COswald 3 3,274 July-15th-2021, 02:10 PM
Last Post: Armin@netPI
  Docker not enabled tad 10 5,122 July-14th-2021, 08:54 AM
Last Post: Armin@netPI
  Docker amd64 instead of arm biancode 3 3,164 January-17th-2021, 09:40 PM
Last Post: Armin@netPI
  docker.service start failed EUROKEY 13 9,633 January-17th-2021, 07:52 PM
Last Post: Armin@netPI
  Get host MAC via REST API inside container bschandra 4 3,825 November-16th-2020, 09:26 AM
Last Post: bschandra
  Docker cannot find image COswald 16 9,436 May-18th-2020, 07:15 AM
Last Post: COswald
  After „Rebuild“ of Docker neither the node-RED nor the dashboard can be accessed MAK 4 4,465 January-31st-2020, 02:14 PM
Last Post: MAK
  [SOLVED] Docker GUI login issue MGharat 1 2,854 September-19th-2019, 11:50 AM
Last Post: Armin@netPI
  [SOLVED] Help with fieldbus node Farani 5 4,168 August-20th-2019, 07:22 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)