Hello,
I have a multicontainer running on a raspberry pi, and a shared volume between services.
i want to be able to share this volume across the network, meaning, to be able to access to the resin-data volume from other PC(linux or windows) or any other mobile app. (with the device name or ip, for example \device-name\resin-data)
Is that possible?
this is how my volume is defined. (its working great between services)
volumes:
resin-data:
process:
container_name: process
build:
context: ./process
volumes:
- ‘resin-data:/data’
server:
container_name: server
build:
context: ./server
volumes:
- ‘resin-data:/data’
The way to do this would be to add another service to your application, that exposes the volume as a samba share, nfs share, or a a simple ssh server (and use sshfs).
If you know which ports you need to be exposed for each service, you can just specify them in the ports section of the docker-compose file. From the top of my head you need 139 and 445 for samba, so the ports section for that service should look like this:
ports:
- "139:139"
- "445:445"
This would expose the ports 139 and 445 of the container on the host.
hi, so i’ve added two things, a container as a file share, i’m sharing what i added to the docker-compose.yml and the dockerfile of the container.
everything works great now, and i can access the volume from other computer in the network.
base-image for python on any machine using a template variable,