Created
January 19, 2023 11:58
-
-
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?
This file contains 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
#!/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