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
#!/usr/bin/env bash | |
container_name=$1 | |
shift | |
timeout=$1 | |
default_timeout=120 | |
if [ -z ${timeout} ]; then | |
timeout=${default_timeout} | |
fi |
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 ps --format '{{.Names}}' | egrep '^container_name$' || docker run --rm --detach --name container_name org/container_name |
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 --rm --detach -p 1025:1025 -p 1080:1080 --name mailcatcher schickling/mailcatcher | |
ui: http://localhost:1080/ | |
SMTP='{"host": "host.docker.internal","port": 1025,"secure": false,"connectionTimeout": 10000,"tls": {"rejectUnauthorized": false}}' |
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 system prune --volumes |
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
npm list -g --depth 0 |
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 stop $(docker ps -a -q) | |
docker rm $(docker ps -a -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
docker push $DOCKER_ORG/$DOCKER_NAME |
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
VERSION=$(node -pe "require('./package.json').version") DOCKER_BUILDKIT=1 docker build --no-cache --tag $DOCKER_ORG/$DOCKER_NAME:$VERSION -f Dockerfile . |
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 --restart=unless-stopped --hostname \$(hostname) -p 84:80 -it --name $DOCKER_NAME $DOCKER_ORG/$DOCKER_NAME:latest" |
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 exec -it $DOCKER_NAME bash |
NewerOlder