projectatomic / ContainerApplicationGenericLabels

Default Containerized Application Labels used to document the application and/or image
68 stars 29 forks source link

Proposal: add TEST label #56

Open shaded-enmity opened 8 years ago

shaded-enmity commented 8 years ago

The purpose of the TEST label is for the image authors to be able to specify a self-contained check to figure out whether the image can run correctly on the given host.

Use case:

FROM fedora:22
LABEL TEST='sh -c "([ -c /dev/kvm ] && [ \"$(stat -c \"%a\" /dev/kvm)\" -eq "666\" ]) || (echo \"Bad KVM device\"; exit 1)"'
$ atomic test my-kvm-image
ERROR: Bad KVM device
fatherlinux commented 8 years ago

OH, I like that. That could help solve my system call problem too:

https://github.com/projectatomic/ContainerApplicationGenericLabels/issues/39