:art完善docker exec
This commit is contained in:
parent
4544dbdf1c
commit
c0cba1ee15
|
@ -23,7 +23,7 @@ OPTIONS说明:
|
||||||
|
|
||||||
|
|
||||||
## docker 定时任务执行
|
## docker 定时任务执行
|
||||||
下面是PHP的satis私有镜像仓库命令在docker中同步命令如下:
|
> 下面是PHP的satis私有镜像仓库命令在docker中同步命令如下:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker exec php74 /bin/sh -c "cd satis/ && php bin/satis build satis.json public/"
|
docker exec php74 /bin/sh -c "cd satis/ && php bin/satis build satis.json public/"
|
||||||
|
@ -33,7 +33,7 @@ docker exec php74 /bin/sh -c "cd satis/ && php bin/satis build satis.json public
|
||||||
3. `-c "cd satis/ && php bin/satis build satis.json public/"` 具体命令执行详情
|
3. `-c "cd satis/ && php bin/satis build satis.json public/"` 具体命令执行详情
|
||||||
|
|
||||||
|
|
||||||
且让它每分钟执行一次,执行`crontab -e` 新增如下代码:
|
> 且让它每分钟执行一次,执行`crontab -e` 新增如下代码:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
* * * * * docker exec php74 /bin/sh -c "cd satis/ && php bin/satis build satis.json public/" > /dev/null 2>&1
|
* * * * * docker exec php74 /bin/sh -c "cd satis/ && php bin/satis build satis.json public/" > /dev/null 2>&1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user