docker images -qf dangling=true | xargs docker rmi
docker volume ls -qf dangling=true | xargs -r docker volume rm
| 1) Download cntlm rpm package from http://sourceforge.net/projects/cntlm/files/cntlm/ | |
| 2) Login as root | |
| 3) Run command: | |
| $ rpm -ivh cntlm-*.rpm | |
| 4a) Obtain password hash for the configuration file in step 4b (do not put plaintext password in configuration) | |
| $ cntlm -H -d <domain> -u <username> |
| git checkout --orphan latest_branch && \ | |
| git add -A && \ | |
| git commit -am "initial commit" && \ | |
| git branch -D master && \ | |
| git branch -m master && \ | |
| git push -f origin master | |
| Taken from |
| #!/bin/bash | |
| # Variables | |
| CONTAINER_NAME=$1 | |
| IMAGE_NAME=$(docker ps -f name=$CONTAINER_NAME --format {{.Image}}) | |
| TMP_DIR="/tmp" | |
| DATE=$(date +"%Y-%m-%d") | |
| DATA_VOLUMES=$(docker inspect --format '{{range .Mounts}}{{.Source}}{{" "}}{{end}}' $CONTAINER_NAME) | |
| BKP_FILE="$TMP_DIR"/"$CONTAINER_NAME"_"$DATE" |
The API we are creating in this gist will follow these rules :
password Grant Type only (no need for Authorization pages and such).v1.api.example.com)The API will be written in PHP with the Symfony 3 framework. The following SF2 bundles are used :
| # Terminal Tab #1 (with privileges inside container) | |
| # ============= | |
| cd "/the/dir/you/want/to/work/with/php8" | |
| docker run --name php8 \ | |
| -it \ | |
| -v $PWD:/var/php:rw \ | |
| php:8.0-cli-alpine3.12 \ | |
| ash | |
| cd /tmp |