Sign inSign up

mnival/swarm-launcher

By mnival

•Updated over 6 years ago

swarm-launcher test

Image
0

1.0K

mnival/swarm-launcher repository overview

⁠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⁠

⁠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:

VariableDefaultMandatoryDescription
LAUNCH_IMAGE-YESThe image for the container
LAUNCH_PROJECT_NAMEswarm-launcherNOIf you want to use a specific name for the project (similar to the stack name)
LAUNCH_SERVICE_NAMErandom (by swarm-launcher)NOIf you want to use a specific name for the service
LAUNCH_CONTAINER_NAMErandom (by docker)NOIf you want to use a specific name for the container (similar to the task name)
LAUNCH_PRIVILEGEDfalseNOSet this to true if you want to start a privileged container
LAUNCH_ENVIRONMENTS-NOSpace separated list of Key=Value pairs. Note: @_@ gets replaced with a single whitespace, so you can expose environment values containing spaces.
LAUNCH_DEVICES-NOSpace separated list of DeviceOnHost:DeviceInContainer
LAUNCH_VOLUMES-NOSpace separated list of File/FolderOnHost:File/FolderInContainer
LAUNCH_HOST_NETWORKfalseNOSet 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-NOSpace separated list of PortOnHost:PortInContainer
LAUNCH_NETWORKS-NOSpace separated list of project networks to create. All networks are created with attachable: true
LAUNCH_EXT_NETWORKS-NOSpace separated list of external networks to attach to
LAUNCH_CAP_ADD-NOSpace separated list of capabilities to add
LAUNCH_CAP_DROP-NOSpace separated list of capabilities to drop
LAUNCH_LABELSai.ix.started-by=ix.ai/swarm-launcher NO Space separated list of Label=Value pairs
LAUNCH_PULLfalseNOSet this to true to check at every container start for the latest image version
LAUNCH_SYSCTLS-NOSpace separated list of sysctl=value
LAUNCH_COMMAND-NOA string that overrides the default command
LAUNCH_CGROUP_PARENT-NOA string that specify the parent cgroup for the container
LAUNCH_STOP_GRACE_PERIOD10s (by docker)NOAllows 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⁠

Tag summary

Content type

Image

Digest

Size

39 MB

Last updated

over 6 years ago

docker pull mnival/swarm-launcher