I want to display a custom message whenever anyone creates a SSH session on Apitble.
To do this, I have added a entrypoint script in Dockerfile to display the message.
echo "message"
exec "$@"
But this is causing before_release
commands execution failure.
Apitble is passing chained commands, for ex: command1 args && command2 args
to the docker.
Docker is executing command1
and treating args && command2 args
as it's arguments and throwing this error.
command1: error: unrecognized arguments: && command2 args
I am not able to reproduced this issue with local containers. I don't know how Aptible passes arguments to container for execution but, talked to support and they provided two solutions.
before_release
.exec /bin/sh -c "$*"
, instead of exec "$@"
in your entrypoint.sh
script