Move images to here

This commit is contained in:
Greg Hellings
2025-11-25 22:42:47 -06:00
parent 8141c6443a
commit 7d3f505dff
9 changed files with 290 additions and 736 deletions
+48
View File
@@ -0,0 +1,48 @@
{
bitwarden-cli,
cacert,
dockerTools,
lib,
wget,
writeShellApplication,
name,
...
}:
dockerTools.buildLayeredImage {
name = name "bitwarden";
tag = "latest";
contents = [
dockerTools.binSh
dockerTools.caCertificates
wget
];
config = {
Cmd = [
(lib.getExe (writeShellApplication {
name = "bitwarden-cli-entrypoint.sh";
runtimeInputs = [ bitwarden-cli ];
text = ''
set -ex
# Uncomment if you need to hit a custom host
#bw config server ''${BW_HOST}
echo "Using apikey to log in"
bw login --apikey --raw
BW_SESSION="$(bw unlock --passwordenv BW_PASSWORD --raw)"
export BW_SESSION
echo 'Running "bw serve" on port 8087'
bw serve --hostname all --port 8087
'';
}))
];
Env = [
"CURL_CA_BUNDLE=${cacert}/etc/ssl/certs/ca-bundle.crt"
];
ExposedPorts = {
"8087/tcp" = { };
};
};
}