22 lines
560 B
Bash
22 lines
560 B
Bash
#!/bin/sh
|
|
echo "Welcome!"
|
|
|
|
version="1.0.1"
|
|
oldver="1.0.0"
|
|
|
|
echo "Pull docker image chatbot-api:$version from registry."
|
|
docker pull alpine-nexus:8500/chatbot/chatbot-api:$version
|
|
|
|
echo "Stop old container."
|
|
docker stop chatbot-api && docker rm chatbot-api
|
|
|
|
echo "Run new container."
|
|
docker run -d --name chatbot-api --restart=always -p 5006:80 alpine-nexus:8500/chatbot/chatbot-api:$version
|
|
|
|
echo "Remove old image chatbot-api:$oldver."
|
|
docker rmi alpine-nexus:8500/chatbot/chatbot-api:$oldver
|
|
|
|
echo "Get container logs:"
|
|
docker logs chatbot-api
|
|
|
|
echo "DONE!" |