Code Monkey home page Code Monkey logo

swarm-launcher's Introduction

swarm-launcher

Pipeline Status Docker Stars Docker Pulls Docker Image Version (latest) Docker Image Size (latest) Gitlab Project

A docker image to allow the launch of container in docker swarm, with options normally unavailable to swarm mode

How it works

The image uses docker-compose to start a new project (see LAUNCH_PROJECT_NAME). You can either use the environment variables to configure the service started inside, or you can supply your own /docker-compose.yml file.

Either way, swarm-launcher takes care of the setup, tear-down and cleanup of the project.

Docs and Usage examples

See Docs and Usage Examples

Building the image

docker build -t swarm-launcher .

Environment variables

The following environment variables are important, if you plan on using a private repository:

Variable
LOGIN_USER
LOGIN_PASSWORD
LOGIN_REGISTRY

The following environment variables are important if you don't supply a /docker-compose.yml file in the swarm-launcher container:

Variable Default Mandatory Description
LAUNCH_IMAGE - YES The image for the container
LAUNCH_PROJECT_NAME swarm-launcher NO If you want to use a specific name for the project (similar to the stack name)
LAUNCH_SERVICE_NAME random (by swarm-launcher) NO If you want to use a specific name for the service
LAUNCH_CONTAINER_NAME random (by docker) NO If you want to use a specific name for the container (similar to the task name)
LAUNCH_PRIVILEGED false NO Set this to true if you want to start a privileged container
LAUNCH_ENVIRONMENTS - NO Space separated list of Key=Value pairs. Note: @_@ gets replaced with a single whitespace, so you can expose environment values containing spaces.
LAUNCH_DEVICES - NO Space separated list of DeviceOnHost:DeviceInContainer
LAUNCH_VOLUMES - NO Space separated list of File/FolderOnHost:File/FolderInContainer
LAUNCH_HOST_NETWORK false NO Set this to true to start the container on the host network. This option is not compatible with LAUNCH_PORTS, LAUNCH_NETWORKS and LAUNCH_EXT_NETWORKS
LAUNCH_PORTS - NO Space separated list of PortOnHost:PortInContainer
LAUNCH_NETWORKS - NO Space separated list of project networks to create. All networks are created with attachable: true
LAUNCH_EXT_NETWORKS - NO Space separated list of external networks to attach to
LAUNCH_CAP_ADD - NO Space separated list of capabilities to add
LAUNCH_CAP_DROP - NO Space separated list of capabilities to drop
`LAUNCH_SECURITY_OPT - NO Space separated list of security options to add
LAUNCH_LABELS ai.ix.started-by=ix.ai/swarm-launcher  NO  Space separated list of Label=Value pairs
LAUNCH_PULL false NO Set this to true to check at every container start for the latest image version
LAUNCH_SYSCTLS - NO Space separated list of sysctl=value
LAUNCH_COMMAND - NO A string that overrides the default command
LAUNCH_CGROUP_PARENT - NO A string that specify the parent cgroup for the container
LAUNCH_STOP_GRACE_PERIOD 10s (by docker) NO Allows to override the default stop_grace_period. Note: It makes sense to also add a slightly higher stop_grace_period to the swarm-launcher stack as well!

Note: Make sure you check out the documentation.

Resources:

Credits

This Docker image is inspired by the post by @akomelj in moby/moby#25885

swarm-launcher's People

Contributors

tlex avatar aallrd avatar mrajcok avatar mnival avatar

Watchers

James Cloos avatar

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.