More precise matching for service names
continuous-integration/drone/push Build is passing Details

This commit is contained in:
3wc 2023-11-17 12:59:42 +00:00
parent 4940b1b732
commit d85572856b
1 changed files with 1 additions and 3 deletions

View File

@ -32,9 +32,7 @@ output_versions(){
run_docker_cp() {
echo "--- start deploy ---"
CONTAINER=$(docker -H "$REMOTE_DOCKER_HOST" container ls \
--format "table {{.ID}},{{.Names}}" \
| grep "${PLUGIN_SERVICE}" | cut -d',' -f1)
CONTAINER=$(docker -H "$REMOTE_DOCKER_HOST" container ls -q -f "name=/$PLUGIN_SERVICE")
if [ -z "$CONTAINER" ]; then
echo "ERROR: can't find container for $PLUGIN_SERVICE"