This file contains hidden or 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 | |
TIMEOUT=1m | |
IMAGE=nginx:latest | |
CONTAINER_ID= | |
term_handler() { | |
# This catch both temporary and persistent containers | |
if docker inspect -f {{.State.Running}} $CONTAINER_ID > /dev/null; then | |
docker rm -f $CONTAINER_ID > /dev/null | |
fi |
This file contains hidden or 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: "3.3" | |
services: | |
foo_container: | |
volumes: | |
- type: bind | |
source: ./foo_container/.bash_history | |
target: /root/.bash_history |
This file contains hidden or 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/bash | |
# Works bad with termination of children processes when started via sudo. Please, run as super-user. | |
if [ "$1" == "" ]; then | |
echo "Usage: no-oom <a line to start new process>" 1>&2 | |
exit 1 | |
fi | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
NewerOlder