You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
571 B

#!/bin/bash
# 容器名称
CONTAINER_NAME=dsRes
# 登录镜像仓库
docker login --username=东师黄海 registry.cn-hangzhou.aliyuncs.com --password DsideaL4r5t6y7u
# 镜像名称
IMAGE_NAME=registry.cn-hangzhou.aliyuncs.com/dsideal/ds_base:dev_20240924140624
# 删除容器
docker rm -f ${CONTAINER_NAME}
# 运行容器
docker run -d --network=host --name "${CONTAINER_NAME}" \
--privileged=true --env WORKING_ENV=dev -w /home -p 8002:8002 -v "$PWD/logs:/home/logs" --restart=always "${IMAGE_NAME}"
# 查看日志
docker logs -f --tail 500 "${CONTAINER_NAME}"