Sign inSign up

hcc23/plik

By hcc23

Updated about 6 years ago

Multi-architecture images of plik (https://hub.docker.com/r/rootgg/plik).

Image
0

448

hcc23/plik repository overview

This image is generated via a GitHub action on https://github.com/hcc23/plik in order to provide multi-architecture images of plik. (Compare this issue.)

One way to use this image (for example, on a Raspberry Pi) is via a docker-compose setup like this (adapted from this docu):

Basic docker-compose Setup

version: "3.2"

services:
  app:
    image: hcc23/plik:edge
    restart: unless-stopped
    volumes:
      - ./plikd.cfg:/home/plik/server/plikd.cfg

... adding persistent storage

A simple docker-compose file setting up a plik instance with persistent file storage could look like this:

version: "3.2"

volumes:
  files:

services:
  app:
    image: hcc23/plik:edge
    restart: unless-stopped
    volumes:
      - ./plikd.cfg:/home/plik/server/plikd.cfg
      - files:/home/plik/server/files

Note, however, that the server is run by a user plik with a UID/GUI of 1000:1000 (compare the Dockerfile), which leads to problems accessing the volume. This can be easily mitigated by changing the access rights in the volume after it has been created:

  1. Trigger volume creation by starting the container
$ docker-compose up -d
  1. Change the ownership in the files folder
$ docker-compose exec --user root app chown plik:plik /home/plik/server/files

... and adding persistent metadata

A similar volumes-based approach could be used to make the sqlite3 metadata database persistent. Here as well, the ownership has to be transfered. As volumes work with folders, however, some extra effort is needed to set this up.

  1. Update the docker-compose file, adding a new volume for the database:
version: "3.2"

volumes:
  files:
  db:

services:
  app:
    image: hcc23/plik:edge
    restart: unless-stopped
    volumes:
      - ./plikd.cfg:/home/plik/server/plikd.cfg
      - files:/home/plik/server/files
      - db:/home/plik/server/db
  1. Start the container:
$ docker-compose up -d
  1. Change ownership of the new volume:
$ docker-compose exec --user root app chown plik:plik /home/plik/server/db
  1. Update plikd.cfg in order to use the volume to hold the sqlite3 database:
[MetadataBackendConfig]
    Driver = "sqlite3"
    ConnectionString = "db/plik.db"
    Debug = false # Log SQL requests
  1. Restart plik:
$ docker-compose stop
$ docker-compose up -d
  1. Setup some local users:
$ docker-compose exec app ./plikd user --help
$ docker-compose exec app ./plikd user create --admin --login mytestuser --name "My Test User" 

Tag summary

Content type

Image

Digest

Size

81 MB

Last updated

about 6 years ago

docker pull hcc23/plik:edge