https://github.com/aogg/dockerfiles/tree/main/golang/http_shell
docker命令行需要保持系统一致
1、alpine-docker标签,是自带docker命令的
docker rm -f http-shell;\
docker run -d --restart=always --name http-shell --privileged \
-v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker \
-p 8080:8080 \
adockero/http-shell:alpine
curl "localhost:8080" -d "cmd=docker ps"
// base64参数
curl "localhost:8080" -d "cmd-base64=$(echo docker ps|base64)"
// docker,注意不要有-i
docker run -t --rm alpine ls
curl "localhost:8387" -d "cmd-base64=ZG9ja2VyIHJ1biAtdCAtLXJtIGFscGluZSBscw=="
Content type
Image
Digest
sha256:fb6dd7e60…
Size
4.6 MB
Last updated
9 months ago
docker pull adockero/http-shell