mirror of
https://github.com/ngrok/docker-ngrok.git
synced 2026-05-17 16:50:40 +00:00
fba06eb6d9
required re-working [distro].nix files to take sha256s as arguments also bumped alpine while we're at it
29 lines
724 B
Nix
29 lines
724 B
Nix
{ pkgs, arch, entrypoint, ngrokBin, shadowSetup, extraCommands, version
|
|
, imageDigest, imageSha256 }:
|
|
|
|
with pkgs;
|
|
let
|
|
alpine = { imageDigest, sha256 }:
|
|
dockerTools.pullImage {
|
|
inherit arch imageDigest sha256;
|
|
imageName = "alpine";
|
|
os = "linux";
|
|
finalImageName = "alpine";
|
|
finalImageTag = "3.14.0";
|
|
};
|
|
in dockerTools.buildLayeredImage {
|
|
inherit extraCommands;
|
|
name = "ngrok/ngrok";
|
|
tag = "${version}-alpine-${arch}";
|
|
fromImage = alpine {
|
|
sha256 = imageSha256;
|
|
inherit imageDigest;
|
|
};
|
|
contents = [ ngrokBin entrypoint ] ++ shadowSetup;
|
|
config = {
|
|
ExposedPorts = { "4040" = { }; };
|
|
Entrypoint = [ "${entrypoint}/entrypoint.sh" ];
|
|
User = "ngrok";
|
|
};
|
|
}
|