Did you know that you can navigate the posts by swiping left and right?

Remote TLS engine-API

engine-api is a favourite choice not only because Python sucks, but because it’s the official golang library coming from the Docker team. Surely I’ll forget this code soon, so I put it here, HTH others too.

Here, a remote TLS connection is set to the Docker Engine 1.12 bootstrapped with Machine. Code is rather self-explanatory.

package main

import (

func main() {
	var c *http.Client
	var host = "tcp://"
	var path = "/path/to/.docker/machine/machines/swarm/"

	securityOptions := tlsconfig.Options{
		CAFile:             filepath.Join(path, "ca.pem"),
		CertFile:           filepath.Join(path, "cert.pem"),
		KeyFile:            filepath.Join(path, "key.pem"),
		InsecureSkipVerify: true,

	tlsc, err := tlsconfig.Client(securityOptions)
	if err != nil {

	c = &http.Client{
		Transport: &http.Transport{
			TLSClientConfig: tlsc,

	defaultHeaders := map[string]string{"User-Agent": "engine-api-cli-1.0"}
	cli, err := client.NewClient(host, "v1.24", c, defaultHeaders) // Engine 1.12
	if err != nil {