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
docker run \ | |
--detach \ | |
--name=[container_name]\ | |
--env="MYSQL_ROOT_PASSWORD=[my_password]" \ | |
--publish 6603:3306 \ | |
--volume=/root/docker/[container_name]/conf.d:/etc/mysql/conf.d \ | |
mysql |
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/sh | |
jq --slurp --raw-input '{"text": "\(.)", "mode": "markdown"}' < README.md | \ | |
curl --data @- https://api.github.com/markdown | \ | |
tee README.html |
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
# one-liner: RUN curl -sSL https://sdk.cloud.google.com | bash | |
# Downloading gcloud package | |
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz | |
# Installing the package | |
RUN mkdir -p /usr/local/gcloud \ | |
&& tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz \ | |
&& /usr/local/gcloud/google-cloud-sdk/install.sh |
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/sh | |
kubectl get pods -l 'app==coredump-agent' --template='{{range .items}}{{.spec.nodeName}} {{.metadata.name}}{{"\n"}}{{end}}' | |
kubectl get pods --template '{{range .items}}{{if eq .spec.nodeName "ip-254-0-90-30.ec2.internal"}}{{.metadata.name}}{{"\n"}}{{end}}}{{end}}' |
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
# Here’s how to create UDP syslog messages via nc, netcat: | |
echo ‘<14>_sourcehost_ messagetext’ | nc -v -u -w 0 _syslog-host_ 514 |
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/sh | |
# replace $container | |
docker run -t --net container:$container bretfisher/netshoot ngrep -d eth0 -x -q |
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/sh | |
# replace $container | |
docker run --pid container:$container --cap-add SYS_PTRACE lukaszlach/strace -s 1024 -f -p 1 |
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/sh | |
docker run -it -v /var/run/docker.sock:/var/run/docker.sock moncho/dry |
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/sh | |
docker volume create portainer_data | |
docker run -d \ | |
-p 9000:9000 \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v portainer_data:/data \ | |
portainer/portainer |
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/sh | |
# change tag! | |
docker run --rm -it \ | |
-v /usr/local/bin/docker:/bin/docker \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v "$(pwd)":"$(pwd)" \ | |
-w "$(pwd)" \ | |
-v "$HOME/.dive.yaml":"$HOME/.dive.yaml" \ |
NewerOlder