Skip to content

Instantly share code, notes, and snippets.

👽
Writing code from another galaxy.

Douglas Miranda douglasmiranda

👽
Writing code from another galaxy.
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
douglasmiranda / docker-client-go.md
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
View docker-client-go.md

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 (
"context"
"fmt"
"io/ioutil"
"os"
"github.com/containerd/containerd/content/local"
"github.com/containerd/containerd/images"
@douglasmiranda
douglasmiranda / cloudSettings
Created Mar 25, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-03-25T01:33:09.061Z","extensionVersion":"v3.2.7"}
@douglasmiranda
douglasmiranda / ubuntu-dell-g3.md
Last active Jul 4, 2019
Ubuntu 16.04 Dell G3 series setup
View ubuntu-dell-g3.md
View gist:a58899729cc23accaeac1549bf65dccb
PYTHON
https://github.com/thumbor/thumbor
https://github.com/ufoym/cropman
https://github.com/agschwender/pilbox
JS
https://github.com/jwagner/smartcrop.js
GO
https://github.com/DarthSim/imgproxy
View gist:b055a19bf1e8a1bce8ecfded518f98e4
- https://github.com/thumbor/thumbor
- https://github.com/thumbor-community/aws
- https://github.com/Starou/django-thumborstorage
- https://github.com/ricobl/django-thumbor
@douglasmiranda
douglasmiranda / ansible.md
Last active Jul 12, 2019
Ansible: Notes, Errors and Solutions
View ansible.md

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 terraform.io is nice!

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

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

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.