Localhost:8080 not reachable

Hi,

I am trying to put remix IDE in a docker (https://remix.ethereum.org/).

My Dockerfile is as simple as
FROM node:10

RUN npm install remix-ide --unsafe-perm -g

EXPOSE 8080:8080
EXPOSE 65520:65520

CMD "remix-ide"

Build seems to be working fine and start too.

docker build . && docker run stef/remix
Sending build context to Docker daemon  145.1MB
Step 1/5 : FROM node:10
 ---> ea119cebc1c3
Step 2/5 : RUN npm install remix-ide --unsafe-perm -g
 ---> Using cache
 ---> 44d13a6984f9
Step 3/5 : EXPOSE 8080:8080
 ---> Running in 90b5a427cf7b
Removing intermediate container 90b5a427cf7b
 ---> 19b8eb1bfabf
Step 4/5 : EXPOSE 65520:65520
 ---> Running in 73db062ce676
Removing intermediate container 73db062ce676
 ---> fedc163c93ed
Step 5/5 : CMD "remix-ide"
 ---> Running in f6d52e72a6a3
Removing intermediate container f6d52e72a6a3
 ---> 4d8eb0da3c96
Successfully built 4d8eb0da3c96
setup notifications for /
Starting Remix IDE at http://localhost:8080 and sharing /
Sat Mar 07 2020 13:49:05 GMT+0000 (Coordinated Universal Time) Remixd is listening on 127.0.0.1:65520

But localhost is not reachable in my browser.

docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                 NAMES
4f4c8c438da6        stef/remix          "docker-entrypoint.s…"   40 seconds ago      Up 39 seconds       8080/tcp, 65520/tcp   cocky_taussig

What part am I doing wrong?

Thanks,

Stéphane.

Config:
NAME=“Ubuntu”
VERSION=“18.04.4 LTS (Bionic Beaver)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=“Ubuntu 18.04.4 LTS”
VERSION_ID=“18.04”
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Docker version 19.03.5, build 633a0ea838

An EXPOSE declaration in the Dockerfile is merly a hint. It does nothing by itself.

You need to publish ports in your dock run command in order to access them from the host or other machines in your networ

Thanks. I am new to docker…
If I am using docker-compose I could do like this?

    build: .
    ports:
      - "8080:8080"

of course, you use the short syntax.

Exposing a port doesn’t do what you think it does. You need to publish it with the -p (or -P) command or with the ports config in Docker compose.