Move images to here
This commit is contained in:
@@ -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" = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
{
|
||||
bashInteractive,
|
||||
dockerTools,
|
||||
git,
|
||||
lib,
|
||||
nix,
|
||||
nix-output-monitor,
|
||||
pkgs,
|
||||
podman,
|
||||
writeShellApplication,
|
||||
|
||||
name,
|
||||
...
|
||||
}:
|
||||
let
|
||||
policy = (
|
||||
pkgs.writeTextFile {
|
||||
name = "policy.json";
|
||||
text = ''
|
||||
{
|
||||
"default": [{"type": "insecureAcceptAnything"}]
|
||||
}
|
||||
'';
|
||||
destination = "/etc/containers/policy.json";
|
||||
}
|
||||
);
|
||||
activate = writeShellApplication {
|
||||
name = "activate";
|
||||
runtimeInputs = [ bashInteractive ];
|
||||
text = ''
|
||||
mkdir -p /etc/containers
|
||||
cp ${policy}/etc/containers/policy.json /etc/containers/policy.json;
|
||||
bash "$@"
|
||||
'';
|
||||
};
|
||||
in
|
||||
(import "${nix.src.outPath}/docker.nix" {
|
||||
inherit pkgs;
|
||||
name = name "builder";
|
||||
tag = "latest";
|
||||
|
||||
bundleNixpkgs = false;
|
||||
Cmd = [
|
||||
(lib.getExe activate)
|
||||
];
|
||||
extraPkgs = [
|
||||
dockerTools.caCertificates
|
||||
nix-output-monitor
|
||||
podman
|
||||
policy
|
||||
];
|
||||
flake-registry = (pkgs.formats.json { }).generate "flake-registry.json" ({
|
||||
version = 2;
|
||||
flakes.nixpkgs = {
|
||||
exact = true;
|
||||
from = {
|
||||
id = "nixpkgs";
|
||||
type = "indirect";
|
||||
};
|
||||
to = "${pkgs.path}";
|
||||
};
|
||||
});
|
||||
gitMinimal = git; # We want the full version in this
|
||||
maxLayers = 111;
|
||||
nixConf = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
immich-go,
|
||||
cacert,
|
||||
dockerTools,
|
||||
lib,
|
||||
|
||||
name,
|
||||
...
|
||||
}:
|
||||
dockerTools.buildLayeredImage {
|
||||
name = name "immich";
|
||||
tag = "latest";
|
||||
contents = [
|
||||
dockerTools.binSh
|
||||
dockerTools.caCertificates
|
||||
immich-go
|
||||
];
|
||||
config = {
|
||||
Cmd = [
|
||||
(lib.getExe immich-go)
|
||||
];
|
||||
Env = [
|
||||
"CURL_CA_BUNDLE=${cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
cacert,
|
||||
coreutils,
|
||||
dockerTools,
|
||||
findutils,
|
||||
gnugrep,
|
||||
gnused,
|
||||
podman,
|
||||
sword,
|
||||
|
||||
name,
|
||||
}:
|
||||
dockerTools.buildLayeredImage {
|
||||
name = name "sword-container-builder";
|
||||
tag = "latest";
|
||||
contents = [
|
||||
podman
|
||||
dockerTools.binSh
|
||||
dockerTools.caCertificates
|
||||
coreutils
|
||||
findutils
|
||||
gnugrep
|
||||
gnused
|
||||
sword
|
||||
dockerTools.usrBinEnv
|
||||
];
|
||||
config.Env = [
|
||||
"CURL_CA_BUNDLE=${cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
bash,
|
||||
cacert,
|
||||
coreutils,
|
||||
curlWithGnuTls,
|
||||
dockerTools,
|
||||
gawk,
|
||||
gnugrep,
|
||||
findutils,
|
||||
jq,
|
||||
packer,
|
||||
pup,
|
||||
shellcheck,
|
||||
python3,
|
||||
xonsh,
|
||||
}:
|
||||
let
|
||||
basicPython = (python3.withPackages (p: with p; [ pyyaml ]));
|
||||
x = xonsh.overridePtyhonAttrs (old:
|
||||
{
|
||||
python3 = basicPython;
|
||||
propagatedbuildInputs = old.propagatedBuildInputs ++ [ basicPython.pkgs.pyyaml ];
|
||||
});
|
||||
in
|
||||
dockerTools.buildLayeredImage {
|
||||
name = "vm-test";
|
||||
tag = "latest";
|
||||
contents = [
|
||||
bash
|
||||
dockerTools.binSh
|
||||
dockerTools.caCertificates
|
||||
coreutils
|
||||
curlWithGnuTls
|
||||
dockerTools.fakeNss
|
||||
gawk
|
||||
gnugrep
|
||||
findutils
|
||||
jq
|
||||
packer
|
||||
pup
|
||||
shellcheck
|
||||
dockerTools.usrBinEnv
|
||||
x
|
||||
];
|
||||
extraCommands = ''
|
||||
mkdir -p tmp
|
||||
chmod 1777 tmp
|
||||
'';
|
||||
config.Env = [
|
||||
"CURL_CA_BUNDLE=${cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||
];
|
||||
};
|
||||
Reference in New Issue
Block a user