dockerdockerfilelinthadolint

How to give JSON notation syntax for given command in dockerfile for linting purpose?


Could you please provide JSON notation syntax for following command for Dockerfile Linting?

CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 app:app

Solution

  • From Proper JSON notation syntax in a Dockerfile when piping output through multiple commands on a `CMD` line? you need to provide the command as such

    CMD ["sh", "-c", "exec gunicorn --bind :$PORT --workers 1 --threads 8 app:app"]