docker-library / ghost

Docker Official Image packaging for Ghost
https://hub.docker.com/_/ghost
MIT License
745 stars 314 forks source link

Custom Port #376

Closed petuniapetals closed 1 year ago

petuniapetals commented 1 year ago

I am trying to run the $ docker run -d --name some-ghost -e NODE_ENV=development -e url=http://localhost:3001 -p 3001:2368 ghost

However, everytime i key in the docker run file i get the message

Error response from daemon: Conflict. The container name "/some-ghost" is already in use by container "65280a0e6ad2f144cfc512b75b9c5f231a2e8cb6d3528f6db622c0c94fe71c41". You have to remove (or rename) that container to be able to reuse that name. See 'docker run --help'.

wglambert commented 1 year ago

Do docker ps -a to see all "stopped" containers that are still holding their container name and any port bindings. Then you can docker rm -f some-ghost

In the future questions like these are better asked over at the Docker Community Forums, Docker Community Slack, or Stack Overflow. Since these repos aren't really a user-help forum