docker-compose.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. version: '2'
  2. volumes:
  3. plain_data:
  4. encfs_password:
  5. sshd_host_keys:
  6. services:
  7. encfs:
  8. image: fphammerle/reverse-encfs:0.1.1-encfs1.9.5-amd64
  9. volumes:
  10. - plain_data:/plain/data:ro
  11. - encfs_password:/secret
  12. # Currently docker does not allow changing
  13. # the mount propagation setting for named volumes.
  14. # https://github.com/moby/moby/pull/17034#issuecomment-163361073
  15. # https://github.com/moby/moby/pull/17034/files#diff-6896c3d2994ef80758bb7e38c07eb76bR103
  16. # https://github.com/moby/moby/blob/675144ff8d251a97322859a78f28ed4f988d3a74/volume/volume_unix.go#L100
  17. # So we bind mount a host dir instead.
  18. - /mnt/encrypted:/encrypted:shared
  19. networks: []
  20. devices: [/dev/fuse]
  21. cap_add: [SYS_ADMIN]
  22. security_opt: ['apparmor:unconfined']
  23. encfs_pwd_rgpgfs:
  24. image: fphammerle/rgpgfs:0.1.1-amd64
  25. environment:
  26. RECIPIENT: 1234567890ABCDEF1234567890ABCDEF12345678
  27. volumes:
  28. - encfs_password:/plain:ro
  29. - /mnt/encrypted/encfs-password:/encrypted:shared
  30. devices: [/dev/fuse]
  31. cap_add: [SYS_ADMIN]
  32. security_opt: ['apparmor:unconfined']
  33. tty: true
  34. rsync_sshd:
  35. image: fphammerle/rsync-sshd:0.1-amd64
  36. environment:
  37. USERS: alice
  38. volumes:
  39. - /mnt/encrypted:/data:slave,ro
  40. - sshd_host_keys:/etc/ssh/host_keys
  41. - ~/.ssh/authorized_keys:/home/alice/.ssh/authorized_keys:ro
  42. ports: ['127.0.0.1:2022:22']
  43. # rsync -av --rsh='ssh -p 2022' alice@localhost:/ encrypted
  44. # https://docs.docker.com/compose/compose-file/compose-file-v2/