teepot/packages/container-verify-attestation-sgx-dcap/default.nix
Harald Hoyer 97420df006
feat: attestation test on azure and default dcap
```
❯ docker run -i --rm --privileged  --device /dev/sgx_enclave --net host \
  matterlabsrobot/teepot-self-attestation-test-sgx-azure:latest \
  | base64 -d --ignore-garbage \
  | docker run -i --rm --net host matterlabsrobot/verify-attestation-sgx-azure:latest
```

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-03-07 16:05:27 +01:00

34 lines
712 B
Nix

# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Matter Labs
{ lib
, dockerTools
, buildEnv
, teepot
, openssl
, curl
, nixsgx
, ...
}:
dockerTools.buildLayeredImage {
name = "verify-attestation-sgx-dcap";
tag = "latest";
config.Cmd = [ "${teepot.teepot.verify_attestation}/bin/verify-attestation" ];
config.Env = [ "LD_LIBRARY_PATH=/lib" ];
contents = buildEnv {
name = "image-root";
paths = with dockerTools; with nixsgx;[
openssl.out
curl.out
sgx-dcap.quote_verify
sgx-dcap.default_qpl
teepot.teepot.verify_attestation
usrBinEnv
binSh
caCertificates
fakeNss
];
pathsToLink = [ "/bin" "/lib" "/etc" "/share" ];
};
}