Search code examples
dockerdockerfiledocker-build

How to add GITHUB_KEY and GITHUB_SECRET in dockerfile


I am running the command below in docker file.

CMD [“ bash”, GITHUB_KEY=“######” GITHUB_SECRET=“##########” ./script/server]

When I run it, I get this error message /bin/sh" 1: Syntax error: Unterminated quoted string


Solution

  • You need to have every parameter surrounded by quotes in the CMD instruction.

    CMD ["bash", "GITHUB_KEY='######'", "GITHUB_SECRET='##########'", "./script/server"]