-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
invalid mount config for type "bind": bind source path does not exist #127
Comments
跑一下下面的指令就好了
|
我感觉是不是要在文档上注明一下? |
这是不符合预期的,这两个文件夹按理说应当被自动创建,待我本地测试一下,看能不能复现先。 |
|
不仅仅是我说的那两个目录,所有的目录都需要手动创建。
|
麻烦尝试一下运行 |
|
|
辛苦再试下这个 version: "3"
services:
busybox:
image: busybox:latest
volumes:
- ./test_dir:/pwd |
|
我顺手在 CentOS 8 上试了一下,一样的问题。
|
我去,这就很奇怪了。 因为创建文件夹这一步,是由 |
参考这份文档,我觉得可能是在你的 compose 配置中,
|
好的,感谢。超出我所了解的范畴了,我有空研究下。 此外我在本地进行了尝试,是没有问题的。 (python3) root@debian:~/pasteme# uname -a
Linux debian 4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux
(python3) root@debian:~/pasteme# docker-compose --version
docker-compose version 1.28.2, build unknown
(python3) root@debian:~/pasteme# docker --version
Docker version 19.03.13, build 4484c46d9d
(python3) root@debian:~/pasteme# tree .
.
└── docker-compose.yml
0 directories, 1 file
(python3) root@debian:~/pasteme# cat docker-compose.yml
version: "3"
services:
pasteme-frontend:
image: pasteme/frontend:3.4.2
container_name: pasteme-frontend
depends_on:
- pasteme-backend
healthcheck:
test: ["CMD", "curl", "-so", "/dev/null", "localhost:8080/usr/config.json"]
interval: 45s
timeout: 3s
retries: 3
restart: always
ports:
- 80:8080
volumes:
- ./data/nginx-logs/:/var/lib/pasteme/
- ./data/frontend-usr/:/www/pasteme/usr/
pasteme-backend:
image: pasteme/go-backend:3.5.2
container_name: pasteme-backend
depends_on:
- pasteme-mysql
healthcheck:
test: ["CMD", "wget", "-O", "/dev/null", "localhost:8000/api/v3/?method=beat"]
interval: 45s
timeout: 3s
retries: 3
restart: always
volumes:
- ./data/backend-config/:/etc/pastemed/
logging:
driver: "json-file"
options:
max-file: "3"
max-size: "128m"
pasteme-mysql:
image: mysql:5.5
container_name: pasteme-mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 45s
timeout: 3s
retries: 3
restart: always
command: [
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
environment:
MYSQL_USER: username
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: pasteme
MYSQL_MAX_ALLOWED_PACKET: 128M
MYSQL_INNODB_LOG_FILE_SIZE: 64M
volumes:
- ./data/mysql:/var/lib/mysql
logging:
driver: "json-file"
options:
max-file: "3"
max-size: "128m"
(python3) root@debian:~/pasteme# docker-compose up -d
Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
Creating network "pasteme_default" with the default driver
Creating pasteme-mysql ... done
Creating pasteme-backend ... done
Creating pasteme-frontend ... done
(python3) root@debian:~/pasteme# tree .
.
├── data
│ ├── backend-config
│ │ └── config.json
│ ├── frontend-usr
│ │ ├── config.json
│ │ └── usr.js
│ ├── mysql
│ │ └── ...
│ └── nginx-logs
│ ├── pasteme.error.log
│ └── pasteme.log
└── docker-compose.yml
8 directories, 101 files |
建议你把 |
你这个问题在你那边可以稳定复现吗? 我把 (python3) root@debian:~/pasteme# uname -a
Linux debian 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux
(python3) root@debian:~/pasteme# docker-compose --version
docker-compose version 1.29.2, build unknown
(python3) root@debian:~/pasteme# docker --version
Docker version 20.10.10, build b485636
(python3) root@debian:~/pasteme# tree .
.
└── docker-compose.yml
0 directories, 1 file
(python3) root@debian:~/pasteme# cat docker-compose.yml
version: "3"
services:
pasteme-frontend:
image: pasteme/frontend:3.4.2
container_name: pasteme-frontend
depends_on:
- pasteme-backend
healthcheck:
test: ["CMD", "curl", "-so", "/dev/null", "localhost:8080/usr/config.json"]
interval: 45s
timeout: 3s
retries: 3
restart: always
ports:
- 80:8080
volumes:
- ./data/nginx-logs/:/var/lib/pasteme/
- ./data/frontend-usr/:/www/pasteme/usr/
pasteme-backend:
image: pasteme/go-backend:3.5.2
container_name: pasteme-backend
depends_on:
- pasteme-mysql
healthcheck:
test: ["CMD", "wget", "-O", "/dev/null", "localhost:8000/api/v3/?method=beat"]
interval: 45s
timeout: 3s
retries: 3
restart: always
volumes:
- ./data/backend-config/:/etc/pastemed/
logging:
driver: "json-file"
options:
max-file: "3"
max-size: "128m"
pasteme-mysql:
image: mysql:5.5
container_name: pasteme-mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 45s
timeout: 3s
retries: 3
restart: always
command: [
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
environment:
MYSQL_USER: username
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: pasteme
MYSQL_MAX_ALLOWED_PACKET: 128M
MYSQL_INNODB_LOG_FILE_SIZE: 64M
volumes:
- ./data/mysql:/var/lib/mysql
logging:
driver: "json-file"
options:
max-file: "3"
max-size: "128m"
(python3) root@debian:~/pasteme# docker-compose up -d
Creating network "pasteme_default" with the default driver
Creating pasteme-mysql ... done
Creating pasteme-backend ... done
Creating pasteme-frontend ... done
(python3) root@debian:~/pasteme# tree .
.
├── data
│ ├── backend-config
│ │ └── config.json
│ ├── frontend-usr
│ │ ├── config.json
│ │ └── usr.js
│ ├── mysql
│ │ └── ...
│ └── nginx-logs
│ ├── pasteme.error.log
│ └── pasteme.log
└── docker-compose.yml
8 directories, 100 files |
稳定复现 |
The text was updated successfully, but these errors were encountered: