GithubHelp home page GithubHelp logo

brunocascio / docker-swarm-network-attacher Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 2.0 1.08 MB

Attach services to specified networks automatically

Home Page: https://hub.docker.com/repository/docker/bcascio/docker-swarm-network-attacher

Dockerfile 11.79% Makefile 20.75% Go 67.46%
network

docker-swarm-network-attacher's Introduction

Docker swarm network attacher (POC)

Description

docker-swarm-network-attacher aims to solve the problem of sharing a network between unrelated containers. With this service we can generate "point-to-point" networks and avoid this problem.

How it works

It basically fetch containers (not services) with label "dsna.enabled=true" and auto connect them to all the overlay networks available on the cluster. Under the hood it performs a docker network connect on every container to every network.

How to deploy it

Deploy dsna service

dsna.stack.yml

version: "3.9"

services:
  service:
    image: bcascio/docker-swarm-network-attacher:<VERSION>
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    deploy:
      replicas: 1
      resources:
        limits:
          memory: 20M
          cpus: '0.05'
        reservations:
          memory: 10M
          cpus: '0.05'

Run the deployment

docker stack deploy -c dsna.stack.yml dsna

Use Cases

  • Cluster Gateway/Ingress
  • External services that require communication with other isolated services on different networks (e.g. prometheus)

Examples

See examples folder to see the use cases on action

How to contribute

Run development

make dev

docker-swarm-network-attacher's People

Contributors

brunocascio avatar

Stargazers

Leopoldo Brines avatar

Watchers

James Cloos avatar  avatar

Forkers

lbrines

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.