Sign inSign up

scrapes/docker-timemachine

By scrapes

•Updated over 8 years ago

Docker netatalk/timemachine Server with functionality

Image
5

359

scrapes/docker-timemachine repository overview

⁠docker-timemachine

A docker container to compile the lastest version of Netatalk in order to run a Time Machine server.

⁠Installation

To download the docker container and execute it, simply run:

$ docker run -h timemachine --name timemachine --restart=unless-stopped -d -v /shares:/shares -it -p 548:548 -p 636:636 scrapes/docker-timemachine

To add users, just run this command:

$ docker exec timemachine add-account USERNAME PASSWORD MOUNT_POINT SHARE_NAME TIMEMACHINE(yes,no) [VOL_SIZE_MB]

Just to add a user without a share:

$ docker exec timemachine add-account USERNAME PASSWORD

To add a user to a share or create a new share:

$ docker exec timemachine add-share VALID_USERS(user1,user2 ...) MOUNT_POINT SHARE_NAME TIMEMACHINE(yes,no) [VOL_SIZE_MB]

But take care that:

  • MOUNT_POINT shouldn´t be an absolute path, it will create an new directory inside your storage(shares) folder.
  • VOL_SIZE_MB is an optional parameter. It indicates the max volume size for that user, as long as the Time Machine flag is used.

Now you have a docker instance running netatalk.

⁠Configure using environment variables

You can configure the container using environment variables (for example, if you use a docker-compose environment).

There are these environment variables:

  • AFP_LOGIN: User name
  • AFP_PASSWORD: User password
  • AFP_NAME: Name of the volume
  • AFP_SIZE_LIMIT: Size in MB of the volume (optional)

Using these variables, the container will create a user at boot time (only one per container).

⁠Auto-discovering

Avahi daemon is commonly used to help your computers to find the services provided by a server.

Avahi isn't built into this Docker image because, due to Docker's networking limitations, Avahi can't spread it's messages to announce the services.

If you want to enable this feature, you can install Avahi daemon on your host following these steps (Ubuntu version):

  • Install avahi-daemon: run sudo apt-get install avahi-daemon avahi-utils
  • Copy the file from avahi/nsswitch.conf to /etc/nsswitch.conf
  • Copy the service description file from avahi/afpd.service to /etc/avahi/services/afpd.service
  • Restart Avahi's daemon: sudo /etc/init.d/avahi-daemon restart

But why install this on your host and not in the container? Because if you don't do it this way, the discovery message won't be able to reach your computers.

⁠Auto start the service

As the image has been started using the --restart=always flag, it will start when the computers boots up.

⁠Contributors

Tag summary

Content type

Image

Digest

Size

24.1 MB

Last updated

over 8 years ago

docker pull scrapes/docker-timemachine