ERROR: for _trilium-cn_1 Cannot create container for service trilium-cn: Invalid container name (_trilium-cn1), only [a-zA-Z0-9][a-zA-Z0-9.-] are allowed
ERROR: for trilium-cn Cannot create container for service trilium-cn: Invalid container name (_trilium-cn1), only [a-zA-Z0-9][a-zA-Z0-9.-] are allowed
ERROR: Encountered errors while bringing up the project.
这是我的 docker-compose.yml 文件(没有做任何修改): version: '3' services: trilium-cn: image: nriver/trilium-cn restart: always ports:
把同文件夹下的 trilium-data 目录映射到容器内
环境变量表示容器内笔记数据的存储路径
可选功能: 健康检查。需要启用的话,把下面的注释去掉
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:8080/api/health-check | jq -e '.status == "ok"' || exit 1"]
interval: 30s
timeout: 10s
retries: 3
执行: $ docker-compose up -d
发生以下错误: Pulling trilium-cn (nriver/trilium-cn:)... latest: Pulling from nriver/trilium-cn c926b61bad3b: Pull complete 3ebae63ae1d8: Pull complete 4df6e7e40a3f: Pull complete bd5b864d1249: Pull complete a33f547192f2: Pull complete 4f4fb700ef54: Pull complete 6f3aa6a3e507: Pull complete Digest: sha256:2426d058f0ee7c0525e30b06ecdfe925529e8be4fa3d37fef214c69c6db75ef1 Status: Downloaded newer image for nriver/trilium-cn:latest Creating _trilium-cn_1 ... error
ERROR: for _trilium-cn_1 Cannot create container for service trilium-cn: Invalid container name (_trilium-cn1), only [a-zA-Z0-9][a-zA-Z0-9.-] are allowed
ERROR: for trilium-cn Cannot create container for service trilium-cn: Invalid container name (_trilium-cn1), only [a-zA-Z0-9][a-zA-Z0-9.-] are allowed ERROR: Encountered errors while bringing up the project.
docker版本: Docker version 24.0.7, build afdd53b