• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Starting services/commands/scripts at startup of a container
#6
Hello, Armin.
I use hilschernetpi/netpi-netx-programming-examples:latest image and want to add my application to container startup.
At the image settings, I see, that entry point is: /usr/sbin/sshd -D.
When I add the container, I have to specify an entry point, "/etc/init.d/entrypoint.sh" (for example). But in your image there is no /etc/init.d/entrypoint.sh. The container is not able to start, if I point to non-existing file.
I solve the problem in the next way:
1. Create container from your image with default entry point
2. Create /etc/init.d/entrypoint.sh
3. Create image from that container
4. Create container from new image and entry point = /etc/init.d/entrypoint.sh

That works, but I think this is not the best solution.
Can you suggest a shorter way?

Thank you,
Walter.
  Reply


Messages In This Thread
RE: [SOLVED] Starting services/commands/scripts at startup of a container - by WalterSchaefer - March-9th-2021, 07:57 AM
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,337 July-13th-2021, 11:32 AM
Last Post: Armin@netPI
  Access to RTC from my own container application tad 1 3,636 March-19th-2021, 02:58 PM
Last Post: Armin@netPI
  OpenVPN container Armin@netPI 0 1,699 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,776 December-3rd-2020, 12:32 PM
Last Post: tad
  NIOT-E-NPIX-4DI4DO with netpi-netx container WalterSchaefer 3 6,933 November-25th-2020, 01:06 PM
Last Post: zen89
  NPIX-4DI4DO and NetPi-Nodered container issues alhammi 4 8,112 November-16th-2020, 01:35 PM
Last Post: alhammi
  Get host MAC via REST API inside container bschandra 4 3,825 November-16th-2020, 09:26 AM
Last Post: bschandra
  Receive at startup additional data through the Fieldbus Port Schranz 1 2,920 September-10th-2020, 10:55 AM
Last Post: Armin@netPI
  Exporting and importing container images Armin@netPI 3 3,276 May-20th-2020, 11:24 AM
Last Post: COswald
Exclamation Creating a container Linnerz 6 4,710 March-6th-2020, 02:47 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 2 Guest(s)