Skip to content

Instantly share code, notes, and snippets.

View thalysonalexr's full-sized avatar
:electron:
Coding solutions

Thalyson Rodrigues thalysonalexr

:electron:
Coding solutions
View GitHub Profile
@thalysonalexr
thalysonalexr / default-pool-address.json
Created January 21, 2023 16:38
Set default pool address to docker subnets
{
"features": {
"buildkit": true
},
"default-address-pools": [
{
"base": "172.50.0.0/24",
"size": 28
}
]
@thalysonalexr
thalysonalexr / create-nginx-service-swarm.sh
Last active January 21, 2023 16:59
Create loadbalancer nginx as Container Service in Swarm
#!/bin/sh
docker service create --name loadbalancer \
--mount type=bind,source=/data/loadbalancer,target=/etc/nginx/conf.d \
--publish 80:80 --publish 443:443 nginx
@thalysonalexr
thalysonalexr / docker-create-docker_gwbridge.sh
Created January 21, 2023 17:03
Create network GW bridge for Swarm
#!/bin/sh
docker network create \
--subnet <same-pool-address-default-docker-subnets> \
--opt com.docker.network.bridge.name=docker_gwbridge \
--opt com.docker.network.bridge.enable_icc=false \
--opt com.docker.network.bridge.enable_ip_masquerade=true \
docker_gwbridge