docker-compose.yml 586 B

12345678910111213141516171819202122232425262728
  1. version: '2.2'
  2. volumes:
  3. data:
  4. host_keys:
  5. ssh_config_alice:
  6. ssh_config_bob:
  7. services:
  8. sshd:
  9. build: .
  10. image: docker.io/fphammerle/rsync-sshd
  11. container_name: rsync_sshd
  12. environment:
  13. USERS: alice,bob
  14. volumes:
  15. - data:/data:rw
  16. - host_keys:/etc/ssh/host_keys:rw
  17. - ssh_config_alice:/home/alice/.ssh:ro
  18. - ssh_config_bob:/home/bob/.ssh:ro
  19. ports:
  20. - '127.0.0.1:2222:22'
  21. security_opt: [no-new-privileges]
  22. # docker-compose >=2.2,<3
  23. cpus: 0.4
  24. mem_limit: 32M
  25. # https://docs.docker.com/compose/compose-file/compose-file-v2/