fix: ffmpeg error in docker

This commit is contained in:
Clansty 2023-02-21 13:09:48 +08:00
parent 28418baff2
commit 4ec21f7e86
No known key found for this signature in database
1 changed files with 8 additions and 2 deletions

View File

@ -4,7 +4,13 @@ nix2container.buildImage {
maxLayers = 8;
# optimizations
layers = with pkgs;[
(nix2container.buildLayer { deps = [ bash ]; })
(nix2container.buildLayer {
copyToRoot = pkgs.buildEnv {
name = "root";
paths = [ pkgs.bash pkgs.coreutils ];
pathsToLink = [ "/bin" ];
};
})
(nix2container.buildLayer { deps = [ nodejs ]; })
# deps of sharp
(nix2container.buildLayer {
@ -27,7 +33,7 @@ nix2container.buildImage {
(
pkgs.writeScript "start" ''
#!${pkgs.bash}/bin/bash
${pkgs.coreutils}/bin/mkdir -p /tmp /root/.cache
mkdir -p /tmp /root/.cache
${flakePkgs.prisma-patched}/bin/prisma db push --accept-data-loss --skip-generate --schema ${flakePkgs.default}/libexec/q2tg/node_modules/.prisma/client/schema.prisma
${flakePkgs.default}/bin/q2tg
''