# Docker installation does not expose ports to outside world

**URL:** https://meta.discourse.org/t/docker-installation-does-not-expose-ports-to-outside-world/43344
**Category:** Self-hosting
**Created:** [April 27, 2016, 6:33pm UTC](https://meta.discourse.org/t/docker-installation-does-not-expose-ports-to-outside-world/43344 "2016-04-27T18:33:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pztrick](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pztrick/32/120845_2.png) [@pztrick](https://meta.discourse.org/u/pztrick)
#### Post date: [April 27, 2016, 6:33pm UTC](https://meta.discourse.org/t/docker-installation-does-not-expose-ports-to-outside-world/43344/1 "2016-04-27T18:33:06Z")

</div>

I’ve completed the steps for the docker install. However, I’m unable to connect to the Discourse application from the outside world or host machine. (E.g. `telnet localhost 8001` fails.)

In my `app.yml`:

```plaintext
## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  - "8001:80" # http
# - "443:443" # https

```

Performing `./launcher rebuild app` indicates this docker command:

`usr/bin/docker run -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e DISCOURSE_HOSTNAME= *************-e DISCOURSE_DEVELOPER_EMAILS=***************** -e DISCOURSE_SMTP_ADDRESS= **************-e DISCOURSE_SMTP_USER_NAME=******************* -e DISCOURSE_SMTP_PASSWORD= *************-e LETSENCRYPT_ACCOUNT_EMAIL=********* -h jupiter-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log local_discourse/app /sbin/boot`

The `docker` command appears to missing any expose or port command switch, so I checked `docker ps`:

```plaintext
admin@jupiter:/var/discourse(master)$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
07b612f1f4fc local_discourse/app "/sbin/boot" 18 minutes ago Up 13 minutes app

```

This shows there are no ports exposed?

Finally, to verify Discourse was in fact working inside the host I performed `./launcher enter app`:

```plaintext
root@jupiter-app:/var/www/discourse# wget localhost:80
--2016-04-27 18:31:20-- http://localhost/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’

    [<=>] 18,634 --.-K/s in 0.009s  

2016-04-27 18:31:20 (1.92 MB/s) - ‘index.html’ saved [18634]

root@jupiter-app:/var/www/discourse# 

```

Any ideas? Thanks!

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 27, 2016, 6:36pm UTC](https://meta.discourse.org/t/docker-installation-does-not-expose-ports-to-outside-world/43344/2 "2016-04-27T18:36:55Z")

</div>

Are u on the latest update?

[https://meta.discourse.org/t/upgraded-docker-site-brokedown/43328/8?u=falco](https://meta.discourse.org/t/upgraded-docker-site-brokedown/43328/8)

---

<div class="post-metadata">

### Author: ![pztrick](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pztrick/32/120845_2.png) [@pztrick](https://meta.discourse.org/u/pztrick)
#### Post date: [April 27, 2016, 6:53pm UTC](https://meta.discourse.org/t/docker-installation-does-not-expose-ports-to-outside-world/43344/3 "2016-04-27T18:53:44Z")

</div>

@Falco Thanks, indeed and pulling latest git fixed it. I had quickly searched forums but didn’t see anything immediately helpful. Working now!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 27, 2016, 7:34pm UTC](https://meta.discourse.org/t/docker-installation-does-not-expose-ports-to-outside-world/43344/4 "2016-04-27T19:34:45Z")

</div>


