Skip to content

Instantly share code, notes, and snippets.

View douglasmiranda's full-sized avatar
👽

Douglas Miranda douglasmiranda

👽
  • Earth, Brazil
View GitHub Profile
@douglasmiranda
douglasmiranda / docker-client-go.md
Created May 8, 2019 02:52
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:

package main
import (
"context"
"fmt"
"io/ioutil"
"os"
"github.com/containerd/containerd/content/local"
"github.com/containerd/containerd/images"
@douglasmiranda
douglasmiranda / ubuntu-dell-g3.md
Last active March 2, 2023 21:16
Ubuntu 16.04 Dell G3 series setup
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
- 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 November 1, 2024 20:40
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 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 December 8, 2018 19:50
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:

@douglasmiranda
douglasmiranda / drone.md
Created November 26, 2018 22:59
Status: how Drone deals with monorepo; dir/file changed conditions

Well there's no builtin way of doing.

The problem is:

We need a way of skipping steps, or conditional pipelines that are triggered when some dir/* files.* were changed since last commit.

Useful if you maintain a:

  • Monorepo