mirror of https://github.com/docker/cli.git
Show how to remove a file from the docs s3 bucket, and then invalidate the cloudflare cache
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
parent
5f274ccd57
commit
863f296d3a
|
@ -152,3 +152,32 @@ _if_ the `DISTRIBUTION_ID` is set to the Cloudfront distribution ID (ask the met
|
|||
team) - this will take at least 15 minutes to run and you can check its progress
|
||||
with the CDN Cloudfront Chrome addin.
|
||||
|
||||
## Removing files from the docs.docker.com site
|
||||
|
||||
Sometimes it becomes necessary to remove files from the historical published documentation.
|
||||
The most reliable way to do this is to do it directly using `aws s3` commands running in a
|
||||
docs container:
|
||||
|
||||
Start the docs container like `make docs-shell`, but bind mount in your `awsconfig`:
|
||||
|
||||
```
|
||||
docker run --rm -it -v $(CURDIR)/docs/awsconfig:/docs/awsconfig docker-docs:master bash
|
||||
```
|
||||
|
||||
and then the following example shows deleting 2 documents from s3, and then requesting the
|
||||
CloudFlare cache to invalidate them:
|
||||
|
||||
|
||||
```
|
||||
export BUCKET BUCKET=docs.docker.com
|
||||
export AWS_CONFIG_FILE=$(pwd)/awsconfig
|
||||
aws s3 --profile $BUCKET ls s3://$BUCKET
|
||||
aws s3 --profile $BUCKET rm s3://$BUCKET/v1.0/reference/api/docker_io_oauth_api/index.html
|
||||
aws s3 --profile $BUCKET rm s3://$BUCKET/v1.1/reference/api/docker_io_oauth_api/index.html
|
||||
|
||||
aws configure set preview.cloudfront true
|
||||
export DISTRIBUTION_ID=YUTIYUTIUTIUYTIUT
|
||||
aws cloudfront create-invalidation --profile docs.docker.com --distribution-id $DISTRIBUTION_ID --invalidation-batch '{"Paths":{"Quantity":1, "Items":["/v1.0/reference/api/docker_io_oauth_api/"]},"CallerReference":"6Mar2015sventest1"}'
|
||||
aws cloudfront create-invalidation --profile docs.docker.com --distribution-id $DISTRIBUTION_ID --invalidation-batch '{"Paths":{"Quantity":1, "Items":["/v1.1/reference/api/docker_io_oauth_api/"]},"CallerReference":"6Mar2015sventest1"}'
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue