apisix-docker icon indicating copy to clipboard operation
apisix-docker copied to clipboard

fix: During startup, etcd reported an error.

Open WarriorFromLongAgo opened this issue 1 year ago • 5 comments

docker-compose docker-compose-arm64

"docker-compose -f docker-compose.yml -p docker-apisix up -d", Due to the lack of setting etcd_data, an error occurred.

WarriorFromLongAgo avatar Feb 25 '24 07:02 WarriorFromLongAgo

I don't think there is any difference between the 2 styles?

monkeyDluffy6017 avatar Feb 26 '24 07:02 monkeyDluffy6017

我不认为这两种风格之间有什么区别?

now: etcd_data:/bitnami/etcd update: ./etcd_data:/bitnami/etcd

If I execute this command ‘etcd_data:/bitnami/etcd’, it will report that the folder does not exist.

If I execute this command './etcd_data:/bitnami/etcd', it will generate 'etcd_data' in the current directory.

WarriorFromLongAgo avatar Feb 26 '24 11:02 WarriorFromLongAgo

. /file uses the . / prefix to explicitly specify a file or directory in the current directory. This is a relative path representation, where . represents the current working directory. Using this makes the intent of the path clearer, indicating that you are actually trying to find the file or directory from the current directory. file does not specify a path, just the name of the file or directory. In Docker Compose, if no path is specified (i.e., there is no leading path separator such as . / or / ), this is also treated as a relative path to the directory where the current docker-compose.yml file is located. Although in effect, file and . /file are identical in most cases, omitting . / may make the origin and intent of the path slightly less clear. So the two style is the same, could you deep into this?

monkeyDluffy6017 avatar Feb 27 '24 02:02 monkeyDluffy6017

You are correct. However, there are two issues. 1, this is just an example. For new users, it would be better if they could use it immediately after starting without having to specify another file (etcd_data). 2, the representation of 'etcd_data' is inconsistent between docker-compose.yml and docker-compose-arm64.yml.

您说得对。但是,有两个问题。 1,这只是一个示例。对于新用户来说,启动后立即可用而无需指定另一个文件(etcd_data)会更好。 2,在docker-compose.yml和docker-compose-arm64.yml中,'etcd_data'的表示方式不一致。

WarriorFromLongAgo avatar Feb 27 '24 05:02 WarriorFromLongAgo

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time ordiscuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Apr 27 '24 10:04 github-actions[bot]

This pull request/issue has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

github-actions[bot] avatar May 25 '24 10:05 github-actions[bot]