Skip to content

Instantly share code, notes, and snippets.

View nicosingh's full-sized avatar

Nico Singh nicosingh

View GitHub Profile
version: "3"
services:
tor-router:
container_name: tor-router
image: jess/tor-router:latest
network_mode: host
onion:
image: jess/onion:latest
@nicosingh
nicosingh / README.md
Last active December 7, 2017 16:35
Docker inside a vagrant box

Docker inside a vagrant box

Requirements:

  • Virtualbox
  • Vagrant

How to use:

  1. Download this Gist as a zipfile
  2. Run vagrant up to create and provision a new box
@nicosingh
nicosingh / README.md
Last active December 7, 2017 16:38
Virtualbox inside a vagrant box

Virtualbox inside a vagrant box

Requirements:

  • Virtualbox
  • Vagrant

How to use:

  1. Download this Gist as a zipfile
  2. Run vagrant up to create and provision a new box
#!/bin/bash
# clean not running containers
LIST_STATUS="created restarting removing paused exited dead"
for status_element in $LIST_STATUS
do
for container in $(/usr/bin/docker ps -aq -f status=$status_element)
do
echo "`date '+[%Y-%m-%d %H:%M:%S]'` gracefully eliminating container ${container}"
/usr/bin/docker rm $container
@nicosingh
nicosingh / docker-compose.yml
Created May 23, 2018 20:37
jenkins + artifactory in Docker
# make sure volumes exist before starting this
# mkdir -p {jenkins/volumes/var/jenkins_home,artifactory}
jenkins:
image: jenkins/jenkins:2.84
restart: always
ports:
- "80:8080"
- "50000:50000"
volumes:
- ./jenkins/volumes/var/jenkins_home:/var/jenkins_home
@nicosingh
nicosingh / _index.md
Last active June 28, 2018 11:57
serverless.com Flask app

Create a Flask Serverless Python App

Initialise a new app

$ [~] sls create --template aws-python --path my-cool-app
$ [~] cd my-cool-app

Install sls plugins

@nicosingh
nicosingh / docker-compose.yml
Created July 5, 2018 20:43
Docker Registry with HTTPS
registry:
image: registry:2.6.1
restart: always
ports:
- "5000:5000"
environment:
REGISTRY_HTTP_TLS_CERTIFICATE: /certs/live/domain.address.com/fullchain.pem
REGISTRY_HTTP_TLS_KEY: /certs/live/domain.address.com/privkey.pem
REGISTRY_STORAGE_DELETE_ENABLED: "true"
volumes:
@nicosingh
nicosingh / .gitignore
Last active August 8, 2018 15:00
K8S cluster using Vagrant
.vagrant/
tmp/
@nicosingh
nicosingh / README.md
Last active October 18, 2018 14:02
Custom prometheus metrics 101
@nicosingh
nicosingh / README.md
Last active December 4, 2018 21:42
workaround to run Goad using Docker in your macos

Instructions:

$ vagrant up
$ vagrant ssh goad-node
vagrant@vagrant:~$ ./goad -n 0 -c 10 -t 60 --run-docker https://www.example.com