Command line arguments to Docker CMD

Use ENTRYPOINT for stuff like this. Any CMD parameters are appended to the given ENTRYPOINT.

So, if you update the Dockerfile to:

FROM ubuntu:15.04
ENTRYPOINT ["/bin/bash", "-c", "cat"]

Things should work as you wish.

Also, as you don’t need the $1, you should be able to change it to:

FROM ubuntu:15.04
ENTRYPOINT ["/bin/cat"]

I haven’t tested any of this, so let me know if it doesn’t work.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)