https://github.com/thxcode/curl
cURL supports by Alpine in a docker container.
https://github.com/thxcode/curl
curl docker-image jq openssl
Last synced: 10 months ago
JSON representation
cURL supports by Alpine in a docker container.
- Host: GitHub
- URL: https://github.com/thxcode/curl
- Owner: thxCode
- License: mit
- Archived: true
- Created: 2017-11-07T01:56:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-16T11:06:20.000Z (about 8 years ago)
- Last Synced: 2025-02-03T11:21:56.072Z (11 months ago)
- Topics: curl, docker-image, jq, openssl
- Language: Shell
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cURL
cURL supports by Alpine in a docker container.
[](https://github.com/thxcode/curl) [](https://hub.docker.com/r/maiwj/curl) [](https://hub.docker.com/r/maiwj/curl) [](https://store.docker.com/community/images/maiwj/curl) [](https://github.com/thxcode/curl)
[](https://microbadger.com/images/maiwj/curl) [](http://microbadger.com/images/maiwj/curl) [](http://microbadger.com/images/maiwj/curl.svg)
## References
- [cURL](https://curl.haxx.se/docs/manpage.html)
- [jq](https://stedolan.github.io/jq/)
- [Kubernetes RESTful API](https://kubernetes.io/docs/reference/)
## How to use this image
### Start an instance
To start a container, use the following:
``` bash
$ docker run -it --name test-curl maiwj/curl
```
### Watching resources from Kubernetes Pod
``` bash
$ kubectl run -it --image maiwj/curl:latest test bash
/# export CACERT_PATH=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
/# export TOKEN_CONTENT=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
/# export NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)
/# curl --cacert $CACERT_PATH \
--header "Authorization: Bearer $TOKEN_CONTENT" --header "Connection: Keep-Alive" \
--silent --no-buffer \
-X GET "https://kubernetes/api/v1/watch/namespaces/$NAMESPACE/pods" | jq 'if (.object.status.conditions | length) > 0 and (.object.status.conditions | map(select(.type=="Ready" and .status=="True")) | length) > 0 then {type: .type, name: .object.metadata.name} else empty end'
```
## License
- cURL is released under the [MIT License](https://curl.haxx.se/docs/copyright.html)
- This image is released under the [MIT License](LICENSE)