I am trying to run a docker image with env variables.
But it doesn't work for me either with env.list file or by command line.
docker run -p 49160:8080 -d appname -e FOO='foo'
Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"-e\": executable file not found in $PATH": unknown.
run -p 49160:8080 -d appname --env-file ./env.list
Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"--env-file\": executable file not found in $PATH": unknown.
It does run if I just go:
docker run -p 49160:8080 -d appname
Dockerfile:
FROM node:latest
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
RUN npm install
COPY . /usr/src/app
EXPOSE 8080
CMD [ "npm", "start" ]