Docker Community Forums

Share and learn in the Docker community.

How to expose a port


(Johngrabner) #1

Dockerfile
FROM node:9.4
WORKDIR /app
COPY package.json /app
COPY . /app
CMD node app.js
EXPOSE 80

Run
C:\Users\john_\Documents\GitHub\purple_cloud>docker run 171b2830a121 -p 3000:80
docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused “exec: “-p”: executable file not found in $PATH”: unknown.

Question
what am I doing wrong?


(Sam) #2

docker run parms … image name (or id)

imagename goes LAST , you have it in FRONT of -p


(Johngrabner) #3

I must be dyslexic. Thank you.