teepot/assets/replace-sig.sh
Harald Hoyer 91f1612e0f
chore: cleanup and nixify
* create containers with nix
* updated README.md
* added SPDX license headers

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-02-28 11:09:34 +01:00

20 lines
492 B
Bash

#!/usr/bin/env bash
#
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Matter Labs
#
# This script is used to replace the signature of a gramine docker image with a new one.
# Usage: ./replace-sig.sh <image> <new-signature-file> <old-signature-file>
# Example: ./replace-sig.sh tva tee-vault-admin.sig /app/tee-vault-admin.sig
DOCKERFILE="Dockerfile-tmp-$$"
trap 'rm -f $DOCKERFILE' EXIT
cat > "$DOCKERFILE" <<EOF
FROM $1
COPY $2 $3
EOF
docker build -f "$DOCKERFILE" -t "$1" .