Hi, for some reasons I’m unable to expose the application to my network even using -P.
Here is my Dockerfile:
FROM ruby:2.5.1
RUN apt-get update && apt-get install -qq -y build-essential libpq-dev postgresql-client curl apt-utils apt transport-https imagemagick --fix-missing --no-install-recommends
RUN bundle config --global frozen 1
WORKDIR /app
COPY Gemfile Gemfile.lock ./
RUN bundle install
COPY . .
CMD bundle exec foreman start
I start it:
docker container run -P -e RAILS_LOG_TO_STDOUT=1 directory:latest
It starts ok, no errors:
11:21:40 web.1 | Puma starting in single mode...
11:21:40 web.1 | * Version 3.12.0 (ruby 2.5.1-p57), codename: Llamas in Pajamas
11:21:40 web.1 | * Min threads: 5, max threads: 5
11:21:40 web.1 | * Environment: development
11:21:40 web.1 | * Listening on tcp://0.0.0.0:3000
11:21:40 web.1 | Use Ctrl-C to stop
If I point my browser to localhost:3000 or 0.0.0.0:3000 it connects to nothing (Unable to connect), pretty sure nothing is answering to that port. If I curl 3000 from inside the container I can see the response I’m expecting.
I’ve tried 3000:3000 as well, same. Interesting fact, if I hist ctrl+c the container doesn’t stop.
Can someone help me? I’m out of guesses
ngw