I am practising building web apps on play with Docker (https://www.docker.com/play-with-docker) . My Dockerfile looks like
# Test web-app to use with Pluralsight courses and Docker Deep Dive book
# Linux x64
FROM alpine
LABEL maintainer="nigelpoulton@hotmail.com"
# Install Node and NPM
RUN apk add --update nodejs nodejs-npm
# Copy app to /src
COPY . /src
WORKDIR /src
# Install dependencies
RUN npm install
EXPOSE 8080
ENTRYPOINT ["node", "./app.js"]
Taken from https://github.com/nigelpoulton/psweb/blob/master/Dockerfile. I can build the image and run a container off it, however I am struggling to view the application.
docker container run -d —name web1 -p 8080:8080 psweb
When running off my local terminal, I can see it on localhost:8080 but I do not know which (if it is possible) IP I need to go to see it in a web browser.
On the play with docker UI, there is an IP address 123.456.7.89 and I click Open Port, give it 8080 but I still cannot reach it. Any help with this would be hugely appreciated! Currently I am trying to access 123.456.7.89:8080
Apologies if I am missing something obvious, still very new to docker/webapps