--- platform: linux image_resource: type: registry-image source: {repository: debian} inputs: - name: docker-repo - name: image run: path: /bin/bash args: - -eufo - pipefail - -c - | apt-get update apt-get install --no-install-recommends -y \ ca-certificates \ curl \ fuse-overlayfs \ podman curl -fsSL https://goss.rocks/install | sh export GOSS_SLEEP=${GOSS_SLEEP:-5} export CONTAINER_RUNTIME=${CONTAINER_RUNTIME:-podman} export INPUT_TAR=${INPUT_TAR:-image/image.tar} if [ -f docker-repo/goss.yaml ]; then # The default 'mount' strategy uses 'sleep infinity' to keep # the container alive. If there's an ENTRYPOINT or CMD, use 'cp' # instead to prevent dgoss from overriding it. if grep -qE '^(ENTRYPOINT|CMD)' docker-repo/Dockerfile; then export GOSS_FILES_STRATEGY=cp fi goss --gossfile docker-repo/goss.yaml render > goss.yaml dgoss run docker-archive:${INPUT_TAR} else echo "You're a naughty boy, no goss.yaml file found!" >&2 fi params: CONTAINER_RUNTIME: GOSS_SLEEP: INPUT_TAR: