Skip to content

Instantly share code, notes, and snippets.

View riy's full-sized avatar

Rias A. Sherzad riy

View GitHub Profile
@riy
riy / generate_docker_keys.sh
Last active January 16, 2016 20:01
Create Docker Certificate Authority, Server and Client Certificates
#!/bin/bash
HOST_IP=`ifconfig eth0| awk '/inet addr/{print substr($2,6)}'`
mkdir docker-ca
chmod 0700 docker-ca
cd docker-ca
openssl genrsa -aes256 -out ca-key.pem 2048
openssl req -new -x509 -days 365 -key ca-key.pem -sha256 -out ca.pem
openssl genrsa -out server-key.pem 2048
openssl req -subj "/CN=${HOST_IP}" -new -key server-key.pem -out server.csr
#!/bin/bash
# This script is edited by Brice Dutheil
# See there in french http://blog.arkey.fr/2012/07/30/script-pour-installer-le-jdk-5-sur-macosx-lion/
# Translate button is broken for now, please use Google to translate this website.
#
# 2014/02/10 Updated the script to run on OSX 10.9 Maverick
#
# 2013/05/11 Added a few more guidance when Java Preferences is not available anymore
# Added a simple example of a JDK switch function.