Skip to content

Instantly share code, notes, and snippets.

View saladinjake's full-sized avatar
🏠
Working from home

Juwa Victor saladinjake

🏠
Working from home
View GitHub Profile
@saladinjake
saladinjake / chnserver_deploy.sh
Created May 15, 2019 15:16 — forked from clcollins/chnserver_deploy.sh
CHN-Server Docker Compose file
#!/bin/bash
set -o errexit
set -o nounset
main () {
local mongo_repo="https://github.com/CommunityHoneyNetwork/mongodb.git"
local mongo_commit="c95ab34ba961b4e29b9973a7eec2d0133f15be5c"
local redis_repo="https://github.com/CommunityHoneyNetwork/redis.git"
local redis_commit="b7ad930a8d7a0296fb2fadf955e2a58c3aee73e4"

Working With Docker Hub

Documentation for creating/managing repositories and images for the STINGAR organization on Docker Hub.

NOTE: This should ONLY be done this way until we get some automation.

Before you start

@saladinjake
saladinjake / cleanup_docker.sh
Created May 15, 2019 15:16 — forked from clcollins/cleanup_docker.sh
Cleanup and reset docker on Jenkins workers / slaves
#!/bin/bash
# This script should be located on each Jenkins slave, and the jenkins user should have permission to run it with sudo
# Attempts to cleanly stop and remove all containers, volumes and images.
docker ps -q | xargs --no-run-if-empty docker stop
docker ps -q -a | xargs --no-run-if-empty docker rm --force --volumes
docker volume ls -q | xargs --no-run-if-empty docker volume rm
docker images -a -q | xargs --no-run-if-empty docker rmi -f
# Stops the docker service, unmounts all docker-related mounts, removes the entire docker directory, and starts docker again.