version: "3.7"
services:
uuuu:
image: busybox:latest
container_name: uuuu
restart: always
entrypoint: # 容器启动后执行 top 命令,使容器没法立即退出
- top
#command: ["sleep 1000000"]
volumes:
- hll_data:/app/configs
- hll_conf:/app/conf
ports:
- "28282:8282" # grpc port
volumes:
hll_conf:
driver_opts:
type: "xfs"
o: "bind,size=1m"
device: "/root/plugin/conf"
hll_data:
driver_opts:
type: "tmpfs"
o: "size=1m,uid=1000"
device: "tmpfs"
检查1m是否生效:
[root@peer0 plugin]# docker exec -it uuuu sh
cd /app/configs
for i in `seq 20002` ;do echo "111222222222222222222222">> hll.json; done
for i in `seq 20002` ;do echo "111222222222222222222222">> hll.json; done
sh: write error: No space left on device
sh: write error: No space left on device