HUB
Sign inSign up

mavrick1/req-echo:1.0.0

Manifest digest

sha256:fcf7a00b5e87dc6803ed4a894c76ca21e6877c9ed439dab05edc2ccab761321f

Last pushed

9 days by mavrick1

Type

Sandbox Kit

Manifest digest

sha256:fcf7a00b5e87dc6803ed4a894c76ca21e6877c9ed439dab05edc2ccab761321f

yaml
schemaVersion: "3"
displayName: req-echo
description: Echo an HTTP request through httpbin.org
kind: mixin
capabilities:
    - type: com.docker.sandbox/network-policy@1
      config:
        runtime:
            allow:
                - httpbin.org
    - type: com.docker.sandbox/agent-context@1
      config:
        contentFile: /usr/share/sandbox/kit/req-echo/req-echo-context.md
build: |
    # syntax=docker/dockerfile:1
    FROM scratch
    COPY --chmod=0755 <<'EOF2' /usr/local/bin/req-echo
    #!/bin/sh
    path="${1:-}"
    [ "$#" -gt 0 ] && shift
    exec curl -sS "https://httpbin.org/anything/${path}" "$@"
    EOF2