Update README.md

docker启动方式建议这样,简洁
This commit is contained in:
17_bzhzq 2022-08-30 09:57:51 +08:00 committed by GitHub
parent 6409a9e299
commit bf251b588c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -377,55 +377,35 @@ http://localhost(服务器IP):2333/music?url="复制的(抖音/TikTok)口令/链
## 💾部署(方式二 Docker) ## 💾部署(方式二 Docker)
- 安装docker(Ubuntu) - 安装docker
```console ```yaml
curl -fsSL get.docker.com -o get-docker.sh&&sh get-docker.sh &&systemctl enable docker&&systemctl start docker curl -fsSL get.docker.com -o get-docker.sh&&sh get-docker.sh &&systemctl enable docker&&systemctl start docker
``` ```
- 拉取docker镜像 - 留下config.int和docker-compose.yml文件即可
- 运行命令,让容器在后台运行
```console ```yaml
docker pull evil0ctal/douyin_tiktok_download_api docker compose up -d
``` ```
- 运行Web以及API服务的容器(可选1或2) - 查看容器日志
>1.映射端口 ```yaml
API入口: http://localhost:2333 Web入口: http://localhost:80 docker logs -f douyin_tiktok_download_api
```console
# 映射容器的5000端口到本机80
docker run -d -p 80:5000 -p 2333:2333 evil0ctal/douyin_tiktok_download_api
```
> 2.不映射端口
API入口: http://localhost:2333 Web入口: http://localhost:5000
```console
docker run -d evil0ctal/douyin_tiktok_download_api
```
- 查看容器ID
```console
docker ps
```
- 停止容器
```console
docker stop [容器ID]
``` ```
- 删除容器 - 删除容器
```console ```yaml
docker rm --force [容器ID] docker rm -f douyin_tiktok_download_api
``` ```
- 更新镜像 - 更新
```console ```yaml
sudo docker pull evil0ctal/douyin_tiktok_download_api:latest docker compose pull && docker compose down && docker compose up -d
``` ```
## 🎉截图 ## 🎉截图