I try to run a script in container, but it exit
am i miss parameter?
i want the command result like:
docker exec -it container-id some-parameters-pass-to-script
①
FROM centos
COPY test.sh /test
RUN chmod +x /test
ENTRYPOINT ["/test"]
②
#!/bin/sh
set -e
case “$1” in
test) print “test1 \n”;;
help) print “test2\n” ;;
esac
exec “$@”
docker run -dit testecho
[root@localhost test]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9e984b063b50 testecho “/test help” 6 seconds ago Exited (127) 5 seconds ago focused_swirles