Code Monkey home page Code Monkey logo

docker-netatalk's Introduction

Netatalk in a Docker container

Docker Build Status

An environment running AFP filesharing, Tracker (search/spotlight integration), and mDNS server for service discovery.

I'm in the fast lane! Get me started

To quickly get started with running an Confluence instance, first run the following command:

docker run --detach --publish 548:548 cptactionhank/netatalk:latest

Important: This does not announce the AFP service on the network; connecting to the server should be by Finder's Go -> Connect Server (CMD+K) and then typing afp://servername

Default configuration of Netatalk has one share called My AFP Share and shares to containers /media directory. So host mounting a volume to this path will be the quickest way to start sharing files from your host.

docker run --detach --volume hostpath:/media --publish 548:548 cptactionhank/netatalk:latest

The slower road

With the slower roads documentation some knowledge in administering Docker is implicitly assumed.

Configuring shares

There are two ways of configuring the Netatalk which is either by mounting a configuration file or editing the file from the container itself. Documentation of the configuration file /etc/netatalk/afp.conf can be found here.

Host mounted configuration

This is quite a simple way to change the configuration by supplying an additional docker flag when creating the container.

... --volume hostpath:/etc/netatalk/afp.conf cptactionhank/netatalk

Container edited configuration

You can also edit the file from inside the container using your favorite tool, like sed, echo, etc.

Just start an interactive session with the running container by executing the following command and start doing your work:

docker exec -ti containername bash

If you would like to use an editor like nano, emacs, or vi you have to install it first using apt-get install.

Setting up access credentials

The container comes installed with libnss-ldap and libpam-ldap if you want to use LDAP for authentication, however this is out of scope of this README. So instead we can do the simple thing of creating new Debian users to the container.

docker exec -ti containername adduser --no-create-home timemachine

And then the shares could be configured with a share like

[Secured Share]
path = /media/secure
valid users = timemachine

Service discovery

Service discovery works only when the Avahi daemon is on the same network as your users which is why you need to supply --net=host flag to Docker when creating the container, but do consider that --net=host is considered a security threat. Alternatively you can install and setup an mDNS server on the host and have this describing the AFP service for your container.

Contributions

This has been made with the best intentions and current knowledge so it shouldn't be expected to be flawless. However you can support this too with best practices and other additions.

Out of date documentation, version, lack of tests, etc. why not help out by either creating an issue to open a discussion or by sending a pull request with modifications.

docker-netatalk's People

Contributors

cptactionhank 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.