@@ -6,6 +6,7 @@
|
||||
darktable-lua-scripts = import ./darktable/lua-scripts { inherit pkgs; };
|
||||
|
||||
docker-image-adguardhome = import ./docker/adguardhome { inherit pkgs; };
|
||||
docker-image-attic = import ./docker/attic { inherit pkgs; };
|
||||
docker-image-authelia = import ./docker/authelia { inherit pkgs; };
|
||||
docker-image-base = import ./docker/base { inherit pkgs; };
|
||||
docker-image-comentario = import ./docker/comentario { inherit pkgs; };
|
||||
|
34
packages/docker/attic/default.nix
Normal file
34
packages/docker/attic/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
entrypoint = pkgs.writeTextFile {
|
||||
name = "entrypoint";
|
||||
executable = true;
|
||||
destination = "/bin/entrypoint";
|
||||
text = builtins.readFile ./entrypoint.sh;
|
||||
};
|
||||
in
|
||||
pkgs.dockerTools.buildImage {
|
||||
name = "attic";
|
||||
fromImage = pkgs.docker-image-base;
|
||||
|
||||
copyToRoot = pkgs.buildEnv {
|
||||
name = "root";
|
||||
paths = with pkgs; [
|
||||
entrypoint
|
||||
attic-server
|
||||
attic-client
|
||||
];
|
||||
pathsToLink = [ "/bin" ];
|
||||
};
|
||||
|
||||
config = {
|
||||
Entrypoint = [ "entrypoint" ];
|
||||
ExposedPorts = {
|
||||
"8080/tcp" = { };
|
||||
};
|
||||
WorkingDir = "/var/lib/atticd";
|
||||
Volumes = {
|
||||
"/var/lib/atticd" = { };
|
||||
};
|
||||
};
|
||||
}
|
16
packages/docker/attic/entrypoint.sh
Normal file
16
packages/docker/attic/entrypoint.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
atticd "$@" &
|
||||
PID=$!
|
||||
|
||||
if [ -f /etc/attic/post-start.sh ]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/attic/post-start.sh
|
||||
fi
|
||||
|
||||
trap 'kill -KILL "$PID"' INT TERM
|
||||
wait "$PID"
|
||||
exit $?
|
Reference in New Issue
Block a user