Dockerfile CMD `command not found`
I have the following Dockerfile
:
FROM nodesource/node:jessie
ADD ./ /SOMEPATH
RUN cd /SOMEPATH && npm install
WORKDIR /SOMEPATH
CMD ["bash", "npm run lint"]
When I create and run this image with this command:
docker run -v $(pwd):/SOMEPATH Name_of_image
I am getting the following error:
/bin/sh: 1: ["bash",: not found
However, when I run an image like this, it works:
docker run -v $(pwd):/SOMEPATH Name_of_image NAME_OF_TASK
So why does this work? And why isn't the other one working?
+3
source to share