Don't try to cross-build docker images with nix
Alan Pearce alan@alanpearce.eu
Sat, 01 Jul 2023 09:50:37 +0200
1 files changed, 3 insertions(+), 27 deletions(-)
jump to
M flake.nix → flake.nix
@@ -40,33 +40,9 @@ postInstall = '' cp Caddyfile $out/ ''; }; - docker = pkgs.dockerTools.buildImage { - name = "alanpearce/website"; - fromImage = pkgs.dockerTools.pullImage { - imageName = "caddy"; - finalImageName = "caddy"; - finalImageTag = "2-alpine"; - imageDigest = "sha256:d4ca216d8dc515a49bc20fa22a449283ade6c8fc132eb6fa412ff351664d4917"; - sha256 = "auFzOG+6PSOVNXXXsRsEEThtIHJYM3JUkMQGcUt4cNQ="; - }; - created = flockenzeit.lib.ISO-8601 self.lastModified; - copyToRoot = pkgs.buildEnv { - name = "website"; - paths = with pkgs; [ - packages.default - nss.tools - ]; - pathsToLink = [ "/bin" "/public" ]; - }; - config = { - WorkingDir = "${packages.default}"; - ExposedPorts = { - "80/tcp" = { }; - }; - Volumes = { - "/data" = { }; - }; - }; + docker = import ./docker.nix { + inherit self pkgs flockenzeit; + website = packages.default; }; }; devShell = pkgs.mkShell {