Autostart Script for Docker Container

I want a script that starts if my container start in docker. I have a starter.sh and a dockerfile.

I tried to change the command but it is the same or it didnt work. The file copy of the starter.sh works and it runs.

In my Dockerfile is this code

COPY starter.sh /etc/init.d/starter.sh
RUN chmod +x /etc/init.d/starter.sh
RUN /etc/init.d/starter.sh

In my starter.sh

update-rc.d starter defaults
echo "Hello"

This is the message that comes if it runs the starter.sh

usage: update-rc.d [-n] [-f] <basename> remove
       update-rc.d [-n] [-f] <basename> defaults
       update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
                -n: not really
                -f: force

The disable|enable API is not stable and might change in the future.
Hello

I hope someone could help me

Source: StackOverflow