1

Im trying to get more than one port exposed with the docker run command. The command I am running is docker run -p --detach --publish 8055:80 8455:443 cptactionhank/atlassian-jira:latest, but it gives me the error docker: Invalid containerPort: --detach.

If I then move the -p right before the container ports, I get docker run --detach --publish -p 8055:80 8455:443 cptactionhank/atlassian-jira:latest and get the same error - docker: Invalid containerPort: -p.

Am I missing something obvious here? How can I get this command to work?

Trying docker run -p 8055:80 -p 8455:443 --detach --publish cptactionhank/atlassian-jira:latest gives me docker: "run" requires a minimum of 1 argument.

Proximus
  • 301
  • 1
  • 5
  • 11

1 Answers1

3

You need -p before every port. Please try it that way:

docker run --detach -p 8055:80 -p 8455:443 cptactionhank/atlassian-jira:latest
christian
  • 9,412
  • 10
  • 41
  • 51