Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在docker中自动配置couchbase_Docker_Couchbase - Fatal编程技术网

在docker中自动配置couchbase

在docker中自动配置couchbase,docker,couchbase,Docker,Couchbase,我对docker和couchbase很陌生。我想在couchbase中进行一些初始配置。我使用此脚本设置管理员用户和密码(所有行都相同) 当我转到localhost:8091时,我没有像configure-node.sh那样使用username=Administrator-d password=password登录。但是我可以登录username=Administrator-d password=123456,我在第一次运行应用程序时设置了这个用户名和密码。现在,我删除了couchbase图像

我对docker和couchbase很陌生。我想在couchbase中进行一些初始配置。我使用此脚本设置管理员用户和密码(所有行都相同)

当我转到localhost:8091时,我没有像configure-node.sh那样使用
username=Administrator-d password=password登录。但是我可以登录
username=Administrator-d password=123456
,我在第一次运行应用程序时设置了这个用户名和密码。现在,我删除了couchbase图像,并尝试登录新密码,但我没有。为什么旧密码仍然有效,而我不能用新密码登录

以下是我的所有Dockerfile内容:

FROM couchbase/server
COPY configure-node.sh /opt/couchbase
CMD ["/opt/couchbase/configure-node.sh"]
这是我添加的docker-compose.yml相关部分:

couchbase-db:
    build: couchbase/couchbase-conf
所以我只做了这些改变

当我运行
docker compose up-d couchbase db

Creating network "dev_default" with the default driver
Building couchbase-db
Step 1 : FROM couchbase/server
latest: Pulling from couchbase/server
6c953ac5d795: Already exists
3eed5ff20a90: Already exists
f8419ea7c1b5: Already exists
51900bc9e720: Already exists
a3ed95caeb02: Already exists
d2b32431ebaf: Already exists
6df065d46e65: Already exists
35c916dbd640: Already exists
ef4d6b32517b: Already exists
ac899008ccff: Already exists
a38e2a84ca14: Already exists
009f47caeb08: Already exists
8567214b778f: Already exists
Digest:            sha256:72ed5cb40465e65c8d9cbf22a0dedc081ae0453e5b121ae4618c7436c70478c7
Status: Downloaded newer image for couchbase/server:latest
---> 97d69bb5e7f4
Step 2 : COPY configure-node.sh /opt/couchbase
---> beaa25387e4e
Removing intermediate container f1352ae8478a
Step 3 : CMD /opt/couchbase/configure-node.sh
 ---> Running in be5614f4702d
 ---> 0354f9e07af7
Removing intermediate container be5614f4702d
Successfully built 0354f9e07af7
WARNING: Image for service couchbase-db was built because it did         not already exist.To rebuild this image you must use `docker-compose      build` or `docker-compose up --build`.
Creating dev_couchbase-db_1
然后我用:
docker compose logs-f couchbase db
查找couchbase日志。我明白了:

Attaching to dev_couchbase-db_1
couchbase-db_1  | Starting Couchbase Server -- Web UI available at      http://<ip>:8091
couchbase-db_1  | {error_logger,{{2016,8,18},   {19,15,49}},"global_trace:~n~p",[{loop_the_locker,{multi,[],[],   [],'nonode@nohost',false,false}}]}
couchbase-db_1  | *   Trying 127.0.0.1...
couchbase-db_1  |   % Total    % Received % Xferd  Average Speed       Time    Time     Time  Current
couchbase-db_1  |                                  Dload  Upload       Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- -    -:--:--     0* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)
couchbase-db_1  | > POST /pools/default HTTP/1.1
couchbase-db_1  | > User-Agent: curl/7.40.0-DEV
couchbase-db_1  | > Host: 127.0.0.1:8091
couchbase-db_1  | > Accept: */*
couchbase-db_1  | > Content-Length: 36
couchbase-db_1  | > Content-Type: application/x-www-form-urlencoded
couchbase-db_1  | > 
couchbase-db_1  | } [36 bytes data]
couchbase-db_1  | * upload completely sent off: 36 out of 36 bytes
couchbase-db_1  | < HTTP/1.1 401 Unauthorized
couchbase-db_1  | < WWW-Authenticate: Basic realm="Couchbase Server    Admin / REST"
couchbase-db_1  | < Server: Couchbase Server
couchbase-db_1  | < Pragma: no-cache
couchbase-db_1  | < Date: Thu, 18 Aug 2016 19:16:48 GMT
couchbase-db_1  | < Content-Length: 0
couchbase-db_1  | < Cache-Control: no-cache
couchbase-db_1  | < 
100    36    0     0  100    36      0  30252 --:--:-- --:--:-- -    -:--:-- 36000
couchbase-db_1  | * Connection #0 to host 127.0.0.1 left intact
couchbase-db_1  | *   Trying 127.0.0.1...
couchbase-db_1  |   % Total    % Received % Xferd  Average Speed       Time    Time     Time  Current
couchbase-db_1  |                                  Dload  Upload       Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- -  -:--:--     0* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)
couchbase-db_1  | > POST /node/controller/setupServices HTTP/1.1
couchbase-db_1  | > User-Agent: curl/7.40.0-DEV
couchbase-db_1  | > Host: 127.0.0.1:8091
couchbase-db_1  | > Accept: */*
couchbase-db_1  | > Content-Length: 26
couchbase-db_1  | > Content-Type: application/x-www-form-urlencoded
couchbase-db_1  | > 
couchbase-db_1  | } [26 bytes data]
couchbase-db_1  | * upload completely sent off: 26 out of 26 bytes
couchbase-db_1  | < HTTP/1.1 401 Unauthorized
couchbase-db_1  | < WWW-Authenticate: Basic realm="Couchbase Server     Admin / REST"
couchbase-db_1  | < Server: Couchbase Server
couchbase-db_1  | < Pragma: no-cache
couchbase-db_1  | < Date: Thu, 18 Aug 2016 19:16:48 GMT
couchbase-db_1  | < Content-Length: 0
couchbase-db_1  | < Cache-Control: no-cache
couchbase-db_1  | < 
100    26    0     0  100    26      0  20967 --:--:-- --:--:-- -  -:--:-- 26000
couchbase-db_1  | * Connection #0 to host 127.0.0.1 left intact
couchbase-db_1  | *   Trying 127.0.0.1...
couchbase-db_1  |   % Total    % Received % Xferd  Average Speed       Time    Time     Time  Current
couchbase-db_1  |                                  Dload  Upload      Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)
couchbase-db_1  | > POST /settings/web HTTP/1.1
couchbase-db_1  | > User-Agent: curl/7.40.0-DEV
couchbase-db_1  | > Host: 127.0.0.1:8091
couchbase-db_1  | > Accept: */*
couchbase-db_1  | > Content-Length: 50
couchbase-db_1  | > Content-Type: application/x-www-form-urlencoded
couchbase-db_1  | > 
couchbase-db_1  | } [50 bytes data]
couchbase-db_1  | * upload completely sent off: 50 out of 50 bytes
couchbase-db_1  | < HTTP/1.1 401 Unauthorized
couchbase-db_1  | < WWW-Authenticate: Basic realm="Couchbase Server    Admin / REST"
couchbase-db_1  | < Server: Couchbase Server
couchbase-db_1  | < Pragma: no-cache
couchbase-db_1  | < Date: Thu, 18 Aug 2016 19:16:48 GMT
couchbase-db_1  | < Content-Length: 0
couchbase-db_1  | < Cache-Control: no-cache
couchbase-db_1  | < 
100    50    0     0  100    50      0  19357 --:--:-- --:--:-- --:--:-- 25000
couchbase-db_1  | * Connection #0 to host 127.0.0.1 left intact
couchbase-db_1  |   % Total    % Received % Xferd  Average Speed       Time    Time     Time  Current
couchbase-db_1  |                                  Dload  Upload      Total   Spent    Left  Speed
100    73    0     0  100    73      0    888 --:--:-- --:--:-- --:--:--   901
couchbase-db_1  |   % Total    % Received % Xferd  Average Speed       Time    Time     Time  Current
couchbase-db_1  |                                  Dload  Upload      Total   Spent    Left  Speed
100    70    0     0  100    70      0   5943 --:--:-- --:--:-- --:--:--  6363
couchbase-db_1  |   % Total    % Received % Xferd  Average Speed      Time    Time     Time  Current
couchbase-db_1  |                                  Dload  Upload      Total   Spent    Left  Speed
100    28    0     0  100    28      0   5261 --:--:-- --:--:-- --:--:--  5600
couchbase-db_1  | HTTP/1.1 401 Unauthorized
couchbase-db_1  | WWW-Authenticate: Basic realm="Couchbase Server    Admin / REST"
couchbase-db_1  | Server: Couchbase Server
couchbase-db_1  | Pragma: no-cache
couchbase-db_1  | Date: Thu, 18 Aug 2016 19:16:48 GMT
couchbase-db_1  | Content-Length: 0
couchbase-db_1  | Cache-Control: no-cache
couchbase-db_1  | 
couchbase-db_1  | Type: , Master:  clause. In the asynchronous    mode, CREATE PRIMARY INDEX starts a task to create the primary index and returns as soon as the task is queued for execution. The full   inOUCHBASE_MASTER
couchbase-db_1  | /entrypoint.sh couchbase-server
连接到dev_couchbase-db_1
couchbase-db| 1 |启动couchbase服务器--Web UI可从http://:8091获得
couchbase-db|u 1|{error|u logger,{{2016,8,18},{19,15,49},,“全局跟踪:~n~p”,[{loop|u the|u locker,{multi,[],[],[],[],'nonode@nohost“,false,false}]}
couchbase-db|u 1 |*正在尝试127.0.0.1。。。
couchbase-db|u 1 |%Total%接收到%X平均速度时间电流
couchbase-db|u 1 |加载上载总左速度
0 0 0 0 0 0--:-:-:-:-:-:-:---0*连接到127.0.0.1(127.0.0.1)端口8091(#0)
couchbase-db|u 1 |>POST/pools/default HTTP/1.1
couchbase-db|u 1 |>用户代理:curl/7.40.0-DEV
couchbase-db|u 1 |>主机:127.0.0.1:8091
couchbase-db|u 1 |>接受:*/*
couchbase-db|u 1 |>内容长度:36
couchbase-db_1 |>内容类型:application/x-www-form-urlencoded
couchbase-db|u 1|>
couchbase-db|u 1|}[36字节数据]
couchbase-db|u 1 |*上传已完全发送:36个字节中的36个
couchbase-db|u 1 |POST/node/controller/setupServices HTTP/1.1
couchbase-db|u 1 |>用户代理:curl/7.40.0-DEV
couchbase-db|u 1 |>主机:127.0.0.1:8091
couchbase-db|u 1 |>接受:*/*
couchbase-db|u 1 |>内容长度:26
couchbase-db_1 |>内容类型:application/x-www-form-urlencoded
couchbase-db|u 1|>
couchbase-db|u 1|}[26字节数据]
couchbase-db|u 1 |*完全发送上载:26个字节中的26个
couchbase-db|u 1 |POST/settings/web HTTP/1.1
couchbase-db|u 1 |>用户代理:curl/7.40.0-DEV
couchbase-db|u 1 |>主机:127.0.0.1:8091
couchbase-db|u 1 |>接受:*/*
couchbase-db|u 1 |>内容长度:50
couchbase-db_1 |>内容类型:application/x-www-form-urlencoded
couchbase-db|u 1|>
couchbase-db|u 1|}[50字节数据]
couchbase-db|u 1 |*完全发送上载:50个字节中的50个
couchbase-db|u 1 |