diff --git a/functions/what_is_my_ip/.envrc b/functions/what_is_my_ip/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/functions/what_is_my_ip/.envrc @@ -0,0 +1 @@ +use flake diff --git a/functions/what_is_my_ip/Dockerfile b/functions/what_is_my_ip/Dockerfile new file mode 100644 index 0000000..d4f1541 --- /dev/null +++ b/functions/what_is_my_ip/Dockerfile @@ -0,0 +1,32 @@ + +# syntax = docker/dockerfile:1.4 +FROM nixos/nix:2.21.1@sha256:3f6c77ee4d2c82e472e64e6cd7087241dc391421a0b42c22e6849c586d5398d9 AS builder + +WORKDIR /tmp/build +RUN mkdir /tmp/nix-store-closure + +# ignore SC2046 because the output of nix-store -qR will never have spaces - this is safe here +# hadolint ignore=SC2046 +RUN --mount=type=cache,target=/nix,from=nixos/nix:2.21.1,source=/nix \ + --mount=type=cache,target=/root/.cache \ + --mount=type=bind,target=/tmp/build \ + <