Connection timed out in Heroku when using Docker

I'm trying to deploy an Angular 4 app to Heroku using Docker. But when accessing my app it keeps loading until timeout. I tried using nginx, other npm servers, and my own node.js file for serving my files. But with all methods is the same. My Dockerfile is this:

FROM node:8-alpine

COPY package.json package-lock.json ./

RUN npm set progress=false && npm config set depth 0 && npm cache clean --force

RUN npm i && mkdir /ng-app && cp -R ./node_modules ./ng-app

WORKDIR /ng-app

COPY . .

RUN $(npm bin)/ng build --prod --aot=false --environment=prod

CMD node server.js

My server.js:

const express = require('express');
const path = require('path');
const morgan = require('morgan');
const app = express();
const port = process.env.PORT || 4200;

// Angular DIST output folder
app.use(express.static(path.join(__dirname, './dist')));

// Log
app.use(morgan('dev'));

// Send all other requests to the Angular app
app.get('*', function (req, res) {
    res.sendFile(path.join(__dirname, './dist/index.html'));
});

// Set Port
app.listen(port, function () {
    console.log('Running on localhost: '+port);
});

I push the Docker image via GitLab CI with this job:

production:
    type: deploy
    stage: production
    image: docker:latest
    services:
      - docker:dind
    script:
        - docker login registry.heroku.com -u _ -p "$HEROKU_API_KEY"
        - docker build -t registry.heroku.com/"$HEROKU_APP_NAME"/web .
        - docker push registry.heroku.com/"$HEROKU_APP_NAME"/web
    only:
        - master

The jobs run succesfully and it deploys to heroku. As you can see in the Heroku log:

2018-03-14T19:05:29.972322+00:00 heroku[web.1]: Starting process with command `/bin/sh -c node\ server.js`
2018-03-14T19:05:32.484316+00:00 app[web.1]: Running on localhost: 48598
2018-03-14T19:05:33.694052+00:00 heroku[web.1]: State changed from starting to up

But when accessing Connection Timed Out

Is something missing in Docker?