Created
February 10, 2021 16:20
-
-
Save williamcroberts/3cbef7fd5c62409a6581408c7169fcb7 to your computer and use it in GitHub Desktop.
tss2-docker: examples and functions for running tpm2-software docker containers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Source this file to get commands for launching containers like the tpm2-software CI system | |
# Example Usage: | |
# git clone https://github.com/tpm2-software/tpm2-tss.git | |
# cd tpm2-tss | |
# docker_run ubuntu-20.04 | |
# Uses whatever arg1 is passed to it as container name. Useful for passing hashes from docker build results. | |
_docker_run() { | |
local b=$(basename $(pwd)) | |
docker run --cap-add=SYS_PTRACE --ulimit core=0 -it --env-file .ci/docker.env -v "`pwd`:/workspace/$b" "$1" /bin/bash | |
} | |
# Looks for GitHub Container Registry (GHCR) images and runs them. The containers are availabe under the tpm2-software | |
# packages: https://github.com/orgs/tpm2-software/packages | |
docker_run() { | |
local r="ghcr.io/tpm2-software/${1:-ubuntu-16.04}" | |
_docker_run "$r" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment