# Docker compose: mount samba volume

**URL:** <https://forums.docker.com/t/docker-compose-mount-samba-volume/132407>\
**Category:** Compose\
**Created:** [December 2, 2022, 5:44pm UTC](https://forums.docker.com/t/docker-compose-mount-samba-volume/132407 "2022-12-02T17:44:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![meyay](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/meyay/32/34000_2.png) [@meyay](https://forums.docker.com/u/meyay)\
**Post date:** [December 2, 2022, 7:24pm UTC](https://forums.docker.com/t/docker-compose-mount-samba-volume/132407/2 "2022-12-02T19:24:45Z")

</div>

I declared my cifs shares like this in the past:

```auto
volumes: 
  cifs-volume:
    driver_opts:
      type: cifs 
      o: username=youruser,password=yourpassword,uid=1021,gid=100,vers=3.0
      device: //192.168.x.y/share/subfolder

```

The permissions of your cifs user will be mapped against the uid and gid on your docker host and will have the same uid/gid inside the container.

I don’t recall the reason, but I eventually replaced all my cifs shares with nfsv4 shares.

---

_[View the full topic](https://forums.docker.com/t/docker-compose-mount-samba-volume/132407)._
