I'm trying to create a Docker image with an entrypoint.sh and pass arguments when I run the Docker, the issue is when I want to use arguments with double quotes.
I search in many places, also I know is more a Bash question and how the arguments are expanded by the double quotes, but maybe someone has an idea how to avoid this.
My Dockerfile
:
FROM centos:7
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
My entrypoint.sh
:
#!/bin/bash
command --display=true "$@"
Running the Docker:
docker run -ti docker-image:latest --driver="kernel-4.0 kernel-4.1"
Expected behaviour:
command --display=true --driver="kernel-4.0 kernel-4.1"
Actual behaviour:
command --display=true --driver=kernel-4.0 kernel-4.1
I tried escaping the double quotes but nothing.