Asynchronous work with Docker API is used.
https://github.com/dotX12/fastapi-docker-logs/blob/master/ci_cd.yml
Example in CI/CD
docker run -d --network host \
-v /var/run/docker.sock:/var/run/docker.sock \
-e BASIC_AUTH_USERNAME=${{ secrets.BASIC_AUTH_USERNAME }} \
-e BASIC_AUTH_PASSWORD=${{ secrets.BASIC_AUTH_PASSWORD }} \
--name $(echo $IMAGE_NAME) \
-p 4243:80 \
--restart always \
$(echo $REGISTRY)/$(echo $IMAGE_NAME):$(echo $GITHUB_SHA | head -c7)