Add entrypoint script and cacerts to image
This commit is contained in:
@@ -63,8 +63,22 @@
|
||||
pkgs.dockerTools.buildImage {
|
||||
name = "git.pbrinkmeier.de/paul/yore";
|
||||
tag = yore.version;
|
||||
config.Cmd = [ "${yore}/bin/yore" ];
|
||||
copyToRoot = [ pkgs.cacert ];
|
||||
config.Cmd = [ "${entrypoint}/bin/run" ];
|
||||
};
|
||||
|
||||
entrypoint = pkgs.writeShellApplication {
|
||||
name = "run";
|
||||
runtimeInputs = [ pkgs.coreutils pkgs.dbmate yore ];
|
||||
text = ''
|
||||
mkdir -p /workspace/db
|
||||
cp -r ${./db}/* /workspace/db
|
||||
cd /workspace
|
||||
dbmate up
|
||||
|
||||
yore
|
||||
'';
|
||||
};
|
||||
in {
|
||||
packages = rec {
|
||||
default = yore;
|
||||
|
||||
Reference in New Issue
Block a user