Created
May 14, 2015 22:10
-
-
Save gregarndt/1d427eaeee7d20646438 to your computer and use it in GitHub Desktop.
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
Container ID: d43c0e72caf7af1eb750065d9532d11a6402d34dd68627bf91e24024d4b40a06 | |
IP: 172.17.0.40 | |
Port: 49167 | |
Trying with token... | |
404 page not found | |
Trying without token... | |
test |
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
#!/bin/bash -e | |
docker rm -f $(docker ps -aq) | |
cid=$(docker run -d -e ACCESS_TOKEN=some-string -e DEBUG=* -p 60023 quay.io/mozilla/livelog:v1) | |
echo "Container ID: $cid" | |
ip=$(docker inspect "$cid" | jq -r .[0].NetworkSettings.IPAddress) | |
echo "IP: $ip" | |
port=$(docker inspect "$cid" | jq -r '.[0].NetworkSettings.Ports["60023/tcp"][0].HostPort') | |
echo "Port: $port" | |
curl -X PUT -d test "http://$ip:60022/log" | |
echo "Trying with token..." | |
curl "http://localhost:$port/log/some-string" | |
echo "Trying without token..." | |
curl "http://localhost:$port/log" | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment