小编Ani*_*s D的帖子

Docker,错误:无法运行迁移:数据库需要引导;

这是我尝试过的

docker run --rm \
> --link kong-database:kong-database \
> -e "KONG_DATABASE=postgres" \
> -e "KONG_PG_HOST=kong-database" \
> kong:latest kong migrations up
Run Code Online (Sandbox Code Playgroud)

但我有

Error: cannot run migrations: database needs bootstrapping; run 'kong migrations bootstrap'
Run Code Online (Sandbox Code Playgroud)

我不明白这实际上意味着什么。如果我尝试

docker run --rm --link kong-database:kong-database -e "KONG_DATABASE=postgres" -e "KONG_PG_HOST=kong-database" kong:latest kong migrations bootstrap
bootstrapping database...
Error: [PostgreSQL error] failed to bootstrap database: ERROR: syntax error at or near "NOT" (150)
Run Code Online (Sandbox Code Playgroud)

我检查了kong-database

 {
        "Id": "d94ac442da9a399c1b865de49904e01085abe1ed8f0871af5830810c4c2a78dd",
        "Created": "2019-04-19T07:18:59.534751317Z",
        "Path": "docker-entrypoint.sh",
        "Args": [
            "postgres"
        ],
        "State": {
            "Status": …
Run Code Online (Sandbox Code Playgroud)

postgresql docker kong

3
推荐指数
1
解决办法
3460
查看次数

标签 统计

docker ×1

kong ×1

postgresql ×1