Git Product home page Git Product logo

docker-timemachine's Introduction

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

docker-timemachine's People

Contributors

scrapes avatar odarriba avatar josef-friedrich avatar randominsano avatar gregturn avatar saesh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.