This repository has been archived by the owner on Apr 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
balena.yml
69 lines (56 loc) · 1.87 KB
/
balena.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: NFS Server
description: >-
Serve contents of a volume via an NFS server to allow mounting on your local system
type: sw.block
assets:
repository:
type: blob.asset
data:
url: "https://github.com/balena-labs-research/nfs-server/tree/main"
logo:
type: blob.asset
data:
url: "https://github.com/balena-labs-research/apps-logo"
post-provisioning: >-
## NFS Server
This container exposes the content of a volume for mounting to your local system. Ideal for developing locally while testing on device.
### Starting the server
Add this container to your docker-compose file to share a volume called `nfs`:
```
version: "2"
services:
nfs:
image: bh.cr/maggie0002/nfs-server
volumes:
- "nfs:/nfs"
restart: always
network_mode: host
privileged: true
labels:
io.balena.features.kernel-modules: "1"
io.balena.features.sysfs: "1"
io.balena.features.procfs: "1"
# If content from your primary image is required in the volume ensure this container depends
# on the primary image. This will ensure your primary container creates the volume and inserts
# your content.
# depends_on:
# - name_of_primary_container
volumes:
nfs:
```
If you already have services running, you can start this container manually. Connect to your device with SSH then run:
```
balena run -it --privileged --network host -v /lib/modules:/lib/modules -v /sys/fs:/sys/fs -v nfs:/nfs bh.cr/maggie0002/nfs-server
```
### Accessing the server
Once running, on your Mac you can run the following to make the volume accessible on your system:
`mount_nfs hostname.local:/nfs ./local_dir`
data:
defaultDeviceType: raspberrypi4-64
supportedDeviceTypes:
- raspberry-pi
- raspberry-pi2
- raspberrypi3
- raspberrypi3-64
- raspberrypi4-64
- fincm3