Skip to content

Instantly share code, notes, and snippets.

Writing code from another galaxy.

Douglas Miranda douglasmiranda

Block or report user

Report or block douglasmiranda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
douglasmiranda /
Created May 8, 2019
Docker client API version mismatch: Error response from daemon: client version 1.40 is too new. Maximum supported API version is 1.39

When building things that will interact with the client/server you can have a mismatch of API versions.

This is a common way to get started with the Docker client in Go: (this will create a new client based on your environment settings for Docker)

cli, err := client.NewClientWithOpts(client.FromEnv)

You may face an error similar to:

View pull.go
package main
import (
douglasmiranda / cloudSettings
Created Mar 25, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
douglasmiranda /
Last active Apr 25, 2019
Ubuntu 16.04 Dell G3 series setup
View gist:a58899729cc23accaeac1549bf65dccb
View gist:b055a19bf1e8a1bce8ecfded518f98e4
douglasmiranda /
Last active Apr 23, 2019
Ansible: Notes, Errors and Solutions

Ansible for Configuration Management

I'm using Ansible only for Configuration Management, the server is up and I want to configure users, install packages and configure them.

For infrastructure provisioning is nice!

Currently, my deployment flow includes for CI/CD and Docker Swarm for orchestrating containers.

douglasmiranda /
Last active Dec 8, 2018
Can I retrieve user's IP address in docker swarm mode?

Answer: "NO" (2018-12-08)

When you're running your service on a container as a node of Docker Swarm, you're gonna get the IP of the ingress network gateway, not the user's IP.

Of course there's solutions, not an ideal one, but workarounds with each tool you're using. (Nginx, Caddy, Traefik..)

Related links:

You can’t perform that action at this time.