# docker.sock with balena

**URL:** <https://forums.balena.io/t/docker-sock-with-balena/349723>\
**Category:** balenaOS\
**Created:** [October 17, 2021, 11:10am UTC](https://forums.balena.io/t/docker-sock-with-balena/349723 "2021-10-17T11:10:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luandro](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/luandro/32/6867_2.png) [@luandro](https://forums.balena.io/u/luandro)\
**Post date:** [October 17, 2021, 11:10am UTC](https://forums.balena.io/t/docker-sock-with-balena/349723/1 "2021-10-17T11:10:43Z")

</div>

Trying to port [nginxproxy/nginx-proxy](https://github.com/nginx-proxy/nginx-proxy) to Balena, but the `docker.sock` needs to to be exposed. Here’s an official example:

```auto
services:
 nginx-proxy:
   image: nginxproxy/nginx-proxy
   ports:
     - "80:80"
   volumes:
     - /var/run/docker.sock:/tmp/docker.sock:ro

```

This is what we’ve tried without success:

```auto
services:
  nginx-proxy:
    image: jwilder/nginx-proxy:latest
    network_mode: host
    ports:
      - 80:80
      - 443:443
    environment:
      DOCKER_HOST: /tmp/docker.sock
    volumes:
      - certs:/etc/nginx/certs
      - nginx-conf:/etc/nginx
    restart: always
    labels:
      io.resin.features.balena-socket: '1'

```

We weren’t able to find any info on how to achieve this. Any clues?

---

<div class="post-metadata">

**Author:** ![klutchell](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/klutchell/32/861_2.png) [@klutchell](https://forums.balena.io/u/klutchell)\
**Post date:** [October 17, 2021, 6:15pm UTC](https://forums.balena.io/t/docker-sock-with-balena/349723/2 "2021-10-17T18:15:45Z")

</div>

Hey @luandro, you can expose the balena engine socket with the `io.balena.features.balena-socket=1` label in your compose file!

You can see all of the available labels in our documentation here!

> **[docker-compose.yml fields - Balena Documentation](https://www.balena.io/docs/reference/supervisor/docker-compose/#labels)**
>
> docker-compose.yml fields supported by balena

---

<div class="post-metadata">

**Author:** ![luandro](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/luandro/32/6867_2.png) [@luandro](https://forums.balena.io/u/luandro)\
**Post date:** [October 17, 2021, 9:22pm UTC](https://forums.balena.io/t/docker-sock-with-balena/349723/4 "2021-10-17T21:22:46Z")

</div>

> [@klutchell](#):
>
> io.balena.features.balena-socket=1

Just had to change `resin` for `balena`. Thanks @klutchell, old documentation can be reallly confusing.
