ix-ai / swarm-launcher Goto Github PK
View Code? Open in Web Editor NEWA docker image to allow the launch of container in docker swarm, with options normally unavailable to swarm mode
Home Page: https://ix.ai/swarm-launcher
License: MIT License
A docker image to allow the launch of container in docker swarm, with options normally unavailable to swarm mode
Home Page: https://ix.ai/swarm-launcher
License: MIT License
'OPENVPN_VERBOSITY=1 TZ=xx/xx REGION=US Chicago'
Will result in:
REGION: US
Chicago: null
"OPENVPN_VERBOSITY=1 TZ=xx/xx "REGION=US Chicago"
results in
REGION: US - Chicago
escaping with \
or quoting "US Chicago"
has not worked
I need to launch a container in two networks but unfortunately I'm not able to do it from the LAUNCH_EXTRA_ARGS
env.
The command needed to connect a container into a second network is this one: docker network connect second_network container
.
Do you think it would feasible to add this functionality to swarm-launcher
?
Due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-41110 vulnerability there is a need to trigger a new build to update the docker packages that fixes this vulnerability.
https://docs.docker.com/engine/release-notes/27.1/
thanks
I was wondering given that the underlying container is run via docker-compose and not swarm, is it possible that I give the launcher a secret and it interprets it for the underlying container? For example, I'm looking at the gluetun
vpn client and it owuld be great if the environment variables came from a secret (indirectly, with the swarm launcher interpreting it as env vars)
Great job on this container, looks like it solves many problems with cap_add and privileged but I'm having a bit of trouble in launching it and having it connect to an external network in a traefik stack.
I'm trying to run the binhex/arch-delugevpn container and I've added an ext_network variable for traefik with the required labels under the launch_labels variable. The container runs but I can't connect to it. My guess is I have something wrong with the ext_networks variable. Any thoughts? Should I post the yml file?
Add checks for the following:
LAUNCH_EXT_NETWORKS
exist and are attachableLAUNCH_HOST_NETWORK
and PORTS
, LAUNCH_NETWORKS
or LAUNCH_EXT_NETWORK
are not set at the same timedocker-compose.yml
file exists, so all the LAUNCH_*
options are not setThe label was removed in f381f59 if LAUNCH_LABELS
is set.
For ease of filtering, always attach this label to the running container (if no docker-compose.yml
is provided)
Currently, until docker/compose#6831 gets fixed, the upstream docker/compose
image doesn't support multi-arch.
This should be fixed.
Is it possible to add the shm-size option? Is there another way to pass options this wonderful launcher does not support?
Hello if possible in file entrypoint.sh line 70
replace
COMPOSE_FILE="/docker-compose.yml"
to
COMPOSE_FILE=${LAUNCH_COMPOSE_FILE:-/docker-compose.yml}
There is currently no use-case for the networks to be with attachable: false
.
Am I correct in understanding that the recent LAUNCH_EXT_NETWORKS_IPV4 feature allows for a container launched with swarm-launcher to have a static IPv4 address on the local network, essentially a floating VIP? Ie in the following network scenario, the container could be able to be launched and failover across the swarm nodes with a static IP of say 192.168.1.10 configured?
Network: 192.168.1.0/24
Router: 192.168.1.254 (DHCP Range: 192.168.1.100-200)
Swarm Hosts: 192.168.1.1, 192.168.1.2, 192.168.1.3
if this is the case, could you update the Usage Examples for how this would be configured?
thanks!
Hello, this application is great. Cannot believe Docker Swarm does not support some of this already. Any plans for EXT_NETWORKS_IPV6 support?
Hi. Could support for PID mode be added? As per here: https://docs.docker.com/compose/compose-file/#pid Thanks!
Hi!
Usually, when I run containers in swarm, I add something like that for example (as for chromium)
HEALTHCHECK --interval=1m --timeout=3s CMD curl -f http://localhost:3000 || exit 1
But when I run containers via swarm-launcher, the health check does not work. After the child container starts being unhealthy it's not automatically restarted. As I can understand it's because the containers are started by the swarm-launcher while docker normally does not have the healthcheck functionality (only in swarm directly deployed services).
Is there any option for making HEALTHCHECK work in while launching via swarm-launcher?
Thanks.
Hi its possible to assign vlan id and static ip address?
Like This
version: "3.7"
services:
access-server:
deploy:
labels:
ai.ix.auto-update: 'true'
image: registry.gitlab.com/ix.ai/swarm-launcher:latest
networks:
- guest-networks
- e-wifigate-networks
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:rw'
environment:
LAUNCH_IMAGE: e-access-controller:latest
LAUNCH_PULL: 'false'
LAUNCH_HOST_NETWORK: 'false'
LAUNCH_PROJECT_NAME: 'access-server'
LAUNCH_SERVICE_NAME: 'access-server'
LAUNCH_CAP_ADD: 'NET_ADMIN'
LAUNCH_PRIVILEGED: 'true'
LAUNCH_ENVIRONMENTS: 'VLAN=100'
LAUNCH_VOLUMES: '/var/docker/access-server:/etc/access-server:rw'
ports:
- 3990:3990
- 4990:4990
- 1645:1645
networks:
guest-networks:
driver: macvlan
attachable: true
driver_opts:
parent: ${GUEST_NETWORK_PARENT_ID}
ipam:
config:
- subnet: 192.168.182.0/24
e-local-networks:
driver: overlay
attachable: true
driver_opts:
parent: enp7s0
When I deploy a new configuration for the service swarm-launcher
with a container name (env LAUNCH_CONTAINER_NAME
) the container doesn't get removed when swarm-launcher
gets redeployed.
docker: Error response from daemon: Conflict. The container name "/container" is already in use by container "d1e7c524b78183c17d62bbe82bce73490c881b9132c9f455c0ef5934e734a6f7". You have to remove (or rename) that container to be able to reuse that name.
Hi,
Can we mount local volume ? (i don't have found how to) => not with files/dir mapping.
example :
services:
pcs:
image: ixdotai/swarm-launcher:latest
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:rw'
environment:
LAUNCH_IMAGE: master:5000/pcs:latest
LAUNCH_HOST_NETWORK: 'true'
LAUNCH_PULL: 'true'
LAUNCH_PROJECT_NAME: 'pcs'
LAUNCH_SERVICE_NAME: 'pcs-service'
LAUNCH_CONTAINER_NAME: 'pcs-container'
LAUNCH_PRIVILEGED: 'true'
LAUNCH_VOLUMES: 'pcsd:/var/lib/pcsd'
LAUNCH_CAP_ADD: 'ALL'
LAUNCH_DEVICES: '/dev/xvdb:/dev/xvdb'
LAUNCH_ENVIRONMENTS: 'PASSWORD=ratata38'
volumes:
pcsd:
when i do that , error : service "pcs-service" refers to undefined volume pcsd: invalid compose project :(
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.