Skip to content

Instantly share code, notes, and snippets.

View kunalkushwaha's full-sized avatar

Kunal Kushwaha kunalkushwaha

View GitHub Profile
@kunalkushwaha
kunalkushwaha / container.go
Created February 26, 2015 11:41
Container management using libcontainer.
package main
import (
"fmt"
"os"
"log"
"syscall"
"github.com/docker/libcontainer"
"github.com/docker/libcontainer/configs"
_ "github.com/docker/libcontainer/devices"
@kunalkushwaha
kunalkushwaha / get_time.go
Created April 16, 2015 12:05
Fetch time from timeapi.org and set to system, Alternative to ntp
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"strings"
"bytes"
"os/exec"
@kunalkushwaha
kunalkushwaha / docker-machine-log.md
Created November 5, 2015 01:39
Output of "docker-machine --debug create -d virtualbox default"
kunal@kunal-PC MINGW64 ~
$ docker-machine --debug create -d virtualbox default
Docker Machine Version: 0.5.0-rc4 (952539d)
Launching plugin server for driver virtualbox
Found binary path at C:\Program Files\Docker Toolbox\docker-machine-driver-virtualbox.exe
Plugin server listening at address 127.0.0.1:60168
() Calling RpcServerDriver.GetVersion
Using API Version 1
() Calling RpcServerDriver.SetConfigRaw
@kunalkushwaha
kunalkushwaha / docker-machine-5-0-log.md
Created November 5, 2015 04:20
Output of "docker-machine --debug create -d virtualbox default" for docker-machine v5.0
kunal@kunal-PC MINGW64 ~
$ docker-machine --debug create -d virtualbox default
Docker Machine Version: 0.5.0 (04cfa58)
Found binary path at C:\Program Files\Docker Toolbox\docker-machine-driver-virtualbox.exe
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:53250
() Calling RpcServerDriver.GetVersion
Using API Version 1
() Calling RpcServerDriver.SetConfigRaw
@kunalkushwaha
kunalkushwaha / docker-ssl-cert-generate
Created November 16, 2015 04:16 — forked from cameron/docker-ssl-cert-generate
Generate self-signed SSL certs for docker client <— HTTPS —> daemon
#! /bin/bash
# HEADS UP! Make sure to use '*' or a valid hostname for the FDQN prompt
echo 01 > ca.srl
openssl genrsa -des3 -out ca-key.pem
openssl req -new -x509 -days 365 -key ca-key.pem -out ca.pem
openssl genrsa -des3 -out server-key.pem
openssl req -new -key server-key.pem -out server.csr
@kunalkushwaha
kunalkushwaha / dumpYAML.go
Created December 24, 2015 07:47
dumpYAML
//FIXME: Debug function need to remove at final PR
func dumpYAMLConfig(filename string, document []machineConfig) {
fileToWrite, err := os.Create(filename)
if err != nil {
println("Failed to open file for writing:", err.Error())
}
encoder := yaml.NewEncoder(fileToWrite)
err = encoder.Encode(document)
@kunalkushwaha
kunalkushwaha / docker-beta.log
Created May 11, 2016 05:32
syslog -k Sender Docker output.
May 11 09:42:26 localhost Docker[76] <Notice>: com.docker.vmnetd starting
May 11 09:43:26 KUNALs-MacBook Docker[425] <Notice>: launching...
May 11 09:43:26 KUNALs-MacBook Docker[425] <Notice>: accessing preferences...
May 11 09:43:26 KUNALs-MacBook Docker[425] <Notice>: bundle path: /Users/kunalkushwaha/.Trash/Docker (6388).app/Contents/Library/LoginItems/DockerHelper.app
May 11 09:43:26 KUNALs-MacBook Docker[425] <Notice>: auto start: true
May 11 09:43:26 KUNALs-MacBook Docker[425] <Notice>: launch path: Optional("/Applications/Docker.app")
May 11 09:43:26 KUNALs-MacBook Docker[425] <Notice>: Docker.app sucessfully launched from: /Applications/Docker.app
May 11 09:43:26 KUNALs-MacBook Docker[425] <Notice>: terminating...
May 11 09:43:26 KUNALs-MacBook Docker[445] <Notice>: Application version: 1.11.1-beta10 (6662)
May 11 09:43:26 KUNALs-MacBook Docker[445] <Notice>: OSX Version: Version 10.11.4 (Build 15E65)
@kunalkushwaha
kunalkushwaha / elementary-driver-install.md
Created September 13, 2016 00:34
Ubuntu proprietary driver installation script.
$ sudo ubuntu-drivers debug
$ sudo ubuntu-drivers install
@kunalkushwaha
kunalkushwaha / docker-error.md
Created October 12, 2016 01:58
Docker error after upgrading to docker 1.12.2
Oct 12 10:57:18 kunal-HP-Z400-Workstation systemd[1]: Starting Docker Application Container Engine...
Oct 12 10:57:18 kunal-HP-Z400-Workstation dockerd[9020]: time="2016-10-12T10:57:18.500079458+09:00" level=info msg="libcontainerd: new containerd process, pid: 9028"
Oct 12 10:57:19 kunal-HP-Z400-Workstation audit[9061]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="docker-default" pid=9061 comm="apparmor_parser"
Oct 12 10:57:19 kunal-HP-Z400-Workstation kernel: audit: type=1400 audit(1476237439.541:23): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="docker-default" pid=9061 comm="apparmor_parser"
Oct 12 10:57:19 kunal-HP-Z400-Workstation dockerd[9020]: time="2016-10-12T10:57:19.550757159+09:00" level=info msg="[graphdriver] using prior storage driver \"aufs\""
Oct 12 10:57:19 kunal-HP-Z400-Workstation dockerd[9020]: time="2016-10-12T10:57:19.844985894+09:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Oct 12 10:57:1