I have set up new droplet using the DO droplet (https://marketplace.digitalocean.com/apps/docker. The documentation says that the default firewall for the Docker One-Click is UFW, but I can’t find a way easily enable ports 80 and 443.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @bsscdt ,

Try this command:

docker run -p 80:80 -p 443:443 --name nginx -d nginx

The --name should be the name of your docker container.If you don’t pull nginx yet,also run this before the command I mentioned to mapping 80/443 ports:

docker pull nginx

Regards,
Shiroka

Submit an Answer