Debian Codegraph @

launcher/image/testworkloads/customtoken/happypath/Dockerfile

raw
1 # If updated the workload source code or this Dockerfile, need to rebuild the image and regenerate the signature
2 # From current directory:
3 # GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o main .
4 # gcloud builds submit --tag us-west1-docker.pkg.dev/confidential-space-images-dev/cs-integ-test-images/ipc/happypath:latest
5 # # Record the image digest generated by this command
6 #
7 # Updating the container signature
8 #
9 # # Install cosign
10 # go install github.com/sigstore/cosign/v2/cmd/cosign@latest
11 #
12 # Designate the sig repo
13 # export COSIGN_REPOSITORY=us-docker.pkg.dev/confidential-space-images-dev/cs-cosign-tests/oda
14 #
15 # # Since we don't verify the signature in the test, you can just generate your own key
16 # cosign generate-key-pair
17 # cosign public-key --key cosign.key > pub.pem
18 # PUB=$(cat pub.pem | openssl base64)
19 # PUB=$(echo $PUB | tr -d '[:space:]' | sed 's/[=]*$//')
20 # # Sign the container, <IMAGE_DIGEST> is from the gcloud builds submit command above
21 # cosign sign --key cosign.key us-west1-docker.pkg.dev/confidential-space-images-dev/cs-integ-test-images/ipc/happypath@sha256:<IMAGE_DIGEST> -a dev.cosignproject.cosign/sigalg=ECDSA_P256_SHA256 -a dev.cosignproject.cosign/pub=$PUB
22 #
23 # Once finished, refering to pr#415 to on how to update the signature and image
24
25 FROM alpine
26
27 COPY main /
28
29 ENV env_bar="val_bar"
30
31 LABEL "tee.launch_policy.allow_env_override"="ALLOWED_OVERRIDE"
32 LABEL "tee.launch_policy.allow_cmd_override"="true"
33 LABEL "tee.launch_policy.log_redirect"="always"
34
35 ENTRYPOINT ["/main"]
36
37 # Can be overridden because of the launch policy.
38 CMD ["arg_foo"]