Last active
May 23, 2017 20:29
-
-
Save matt-baker/500f0215485c7057319b0603b4e99a52 to your computer and use it in GitHub Desktop.
Docker service example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Docker image | |
docker build --tag='your_image' . | |
# Create Docker service, default to 0 containers, set environment variable appropriately | |
docker service create --name service_etl --replicas 0 --e "action=etl" your_image # Run ETL example | |
docker service create --name service_analysis --replicas 0 --e "action=analysis" your_image # Run analysis example | |
# Scale as much as your infrastructure will handle | |
docker service scale service_etl=300 | |
docker service scale service_analysis=300 | |
# To scale down when you are done use | |
docker service scale service_etl=0 | |
docker service scale service_analysis=0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment