-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Trishank K Kuppusamy <trishank.kuppusamy@datadoghq.com>
- Loading branch information
1 parent
b6590d8
commit a6d3ab6
Showing
8 changed files
with
88 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# Clone Notary. | ||
go get github.com/theupdateframework/notary | ||
|
||
# We will sign and push this to our localhost Notary and Registry. | ||
docker pull hello-world | ||
docker tag hello-world localhost:5000/hello-world | ||
docker images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
brew install fswatch | ||
|
||
# https://emcrisostomo.github.io/fswatch/doc/1.14.0/fswatch.html/Tutorial-Introduction-to-fswatch.html#Detecting-File-System-Changes | ||
# NOTE: We exclude bin/* to avoid infinite loop. | ||
# TODO: Exclude *.sh, *.md, and other non-source files. | ||
# FIXME: Sometimes fswatch fires a few times in a row. It is what it is. | ||
fswatch -o . -e "bin/*" | (while read; do make install; date; echo; done) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
docker images -a | grep "hello-world" | awk '{print $3}' | xargs docker rmi -f | ||
|
||
DOCKER_CONTENT_TRUST=1 DOCKER_CONTENT_TRUST_SERVER=https://localhost:4443 docker -D pull localhost:5000/hello-world:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
DOCKER_CONTENT_TRUST=1 DOCKER_CONTENT_TRUST_SERVER=https://localhost:4443 docker -D push localhost:5000/hello-world:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
NOTARY=~/go/src/github.com/theupdateframework/notary | ||
|
||
(cd $NOTARY; docker-compose up -d) | ||
|
||
docker run -d \ | ||
--name registry \ | ||
-p 5000:5000 \ | ||
-v $NOTARY/fixtures:/certs \ | ||
-e REGISTRY_HTTP_ADDR=0.0.0.0:5000 \ | ||
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/notary-server.crt \ | ||
-e REGISTRY_HTTP_TLS_KEY=/certs/notary-server.key \ | ||
registry:2 | ||
|
||
docker ps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
NOTARY=~/go/src/github.com/theupdateframework/notary | ||
|
||
(cd $NOTARY; docker-compose down) | ||
|
||
docker stop registry | ||
docker rm registry | ||
rm -rf ~/.docker/trust/tuf/localhost:5000 | ||
docker ps |