Skip to content

Instantly share code, notes, and snippets.

@collabnix
Created January 19, 2023 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save collabnix/d9298ac93a91f369e17ae28eac03e524 to your computer and use it in GitHub Desktop.
Save collabnix/d9298ac93a91f369e17ae28eac03e524 to your computer and use it in GitHub Desktop.
How to Deploy a set of Microservices with a specified version using Docker?
#!/bin/bash
# Get the version of service1
version_service1=$1
# Get the version of service2
version_service2=$2
# Get any additional parameters
additional_param_1=$3
# Start service1 with the specified version
docker run -d --name service1 myregistry/service1:$version_service1 --additional_param_1=$additional_param_1
# Start service2 with the specified version
docker run -d --name service2 myregistry/service2:$version_service2
## Runing the script:
./deploy.sh v1.0 v1.0 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment