• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Starting services/commands/scripts at startup of a container
#4
Hello Jonas,

you have to dig into the details of Docker technology to understand that rc.local and similar things do not work in a container. You have to take care of all such automatic start commands yourself.

Even if you specify a command like you tried the container will start the ENTRYPOINT command that has been specified by us when we have created the container image. All our example containers are starting the file entrypoint.sh that is in the /etc/init.d folder.

There are two methods to start you own commands:

1.) You make you own private container and do not use you example any more and make changes in the entrypoint.sh file in accordance to your ideas or use any other file when the container image is built.

2.) You use the existing container and specify a different Entry Point file in the web browser GUI when you Add a Container. Then this file is used instead of our default file entrypoint.sh.

Thx
Armin

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

  Reply


Messages In This Thread
Answer - by Armin@netPI - April-27th-2018, 07:45 PM
Answer - by Jonas.Sellmann@outlook.de - May-4th-2018, 11:00 AM
Answer - by Armin@netPI - May-7th-2018, 06:24 AM
Answer - by Jonas.Sellmann@outlook.de - May-8th-2018, 06:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TOSILOCK for CONTAINER COswald 3 2,330 July-13th-2021, 11:32 AM
Last Post: Armin@netPI
  Access to RTC from my own container application tad 1 3,634 March-19th-2021, 02:58 PM
Last Post: Armin@netPI
  OpenVPN container Armin@netPI 0 1,696 January-3rd-2021, 12:13 PM
Last Post: Armin@netPI
  operating Console of a container on netPI connected to Wi-Fi tethering tad 3 2,770 December-3rd-2020, 12:32 PM
Last Post: tad
  NIOT-E-NPIX-4DI4DO with netpi-netx container WalterSchaefer 3 6,908 November-25th-2020, 01:06 PM
Last Post: zen89
  NPIX-4DI4DO and NetPi-Nodered container issues alhammi 4 8,084 November-16th-2020, 01:35 PM
Last Post: alhammi
  Get host MAC via REST API inside container bschandra 4 3,813 November-16th-2020, 09:26 AM
Last Post: bschandra
  Receive at startup additional data through the Fieldbus Port Schranz 1 2,917 September-10th-2020, 10:55 AM
Last Post: Armin@netPI
  Exporting and importing container images Armin@netPI 3 3,269 May-20th-2020, 11:24 AM
Last Post: COswald
Exclamation Creating a container Linnerz 6 4,699 March-6th-2020, 02:47 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)