I have an issue with a droplet.
When I run my docker on host 0.0.0.0 and on port 6000 It seems it is not accessible when I do <public ip address>:6000
Although, following the tutorial here, I have ran the commands below : sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw enable sudo ufw allow 6000/tcp
Does someone knows if the port 6000 is allowed to be used in DO or I forgot to configure something ?
Below the dockerfile :
FROM python:3.8.1 ENV FLASK_APP=nace_recommender.api.app:app ENV FLASK_ENV=development ENV WORKERS=4 RUN useradd -b /home -U banana && mkdir -p /home/banana/app COPY . /home/banana/app RUN chown -R banana:banana /home/banana USER banana # set working directory WORKDIR /home/banana/app RUN pip install -r requirements.txt EXPOSE 6000 CMD /home/banana/.local/bin/gunicorn --preload -w $WORKERS -b 0.0.0.0:6000 "nace_recommender.api.app:app()" -t 60
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!