sha256:370cbab71d41f3cba121b1da05925c1bf5a2f8df1f84db733b3d512ab0df2663
Last pushed
7 days by dhibot
Type
Sandbox Kit
Manifest digest
sha256:370cbab71d41f3cba121b1da05925c1bf5a2f8df1f84db733b3d512ab0df2663
schemaVersion: "3"
displayName: GitHub Copilot sessions
author: Docker, Inc. https://docker.com
description: GitHub Copilot host-shared session history
sourceUrl: https://github.com/docker-hardened-images/definitions
version: 1.0.0
licenses:
- Apache-2.0
kind: mixin
requires:
- copilot
capabilities:
- type: com.docker.sandbox/host-mount@1
config:
mode: "0700"
path: /home/agent/copilot-history
- type: com.docker.sandbox/lifecycle@1
config:
install:
- command: |
set -eu
case "${SANDBOX_NAME:-}" in
"" | . | .. | */*) echo 'SANDBOX_NAME must be one path segment' >&2; exit 1 ;;
esac
state="/home/agent/.copilot"
history="/home/agent/copilot-history/$SANDBOX_NAME"
mkdir -p "$state" "$history/session-state"
link="$state/session-state"
target="$history/session-state"
if [ -L "$link" ]; then
[ "$(readlink "$link")" = "$target" ] || { echo "Refusing to replace unexpected symlink: $link" >&2; exit 1; }
exit 0
fi
if [ -e "$link" ]; then
rmdir "$link" || { echo "Cannot replace $link; move existing state to the host directory first." >&2; exit 1; }
fi
ln -s "$target" "$link"
description: Link transcript storage to this sandbox’s host-shared directory
env:
- SANDBOX_NAME
user: agent
args:
version:
required: true
pattern: ^[0-9]+\.[0-9]+\.[0-9]+$
buildArg: VERSION