具有现有CouchDB Docker映像的Heroku无法正常工作

时间:2019-02-28 18:33:33

标签: docker heroku containers couchdb

我从docker(https://hub.docker.com/_/couchdb)处获取了沙发床图像,然后运行以下命令:

docker run -p 5984:5984 -d --name my-couchdb2 couchdb:latest
docker commit 1d329ef7c516 registry.heroku.com/coucherte/web
docker tag my-couchdb2 registry.heroku.com/coucherte/web
docker push registry.heroku.com/coucherte/web
heroku container:release web --app coucherte

在此之后,dyno崩溃了,并显示“ heroku logs --app coucherte”:

2019-02-28T17:55:15.064991+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=coucherte.herokuapp.com request_id=b875a9ce-6b45-4e37-b0fa-9a0ff243b5de fwd="177.251.168.219" dyno= connect= service= status=503 bytes= protocol=http
2019-02-28T17:55:15.542527+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=coucherte.herokuapp.com request_id=291c7afd-0e7d-41f2-846e-6555dbdb4621 fwd="177.251.168.219" dyno= connect= service= status=503 bytes= protocol=http
2019-02-28T18:00:23.647796+00:00 heroku[web.1]: State changed from crashed to starting
2019-02-28T18:00:27.580280+00:00 heroku[web.1]: Starting process with command `/opt/couchdb/bin/couchdb`
2019-02-28T18:00:28.727119+00:00 heroku[web.1]: State changed from starting to crashed
2019-02-28T18:00:28.670713+00:00 app[web.1]: [WARN  tini (4)] Tini is not running as PID 1 and isn't registered as a child subreaper.
2019-02-28T18:00:28.670738+00:00 app[web.1]: Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
2019-02-28T18:00:28.670753+00:00 app[web.1]: To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
2019-02-28T18:00:28.674975+00:00 app[web.1]: find: 'couchdb' is not the name of a known user
2019-02-28T18:00:28.727539+00:00 heroku[web.1]: Process exited with status 1
2019-02-28T18:02:42.410954+00:00 heroku[web.1]: State changed from crashed to starting
2019-02-28T18:02:51.032603+00:00 heroku[web.1]: Starting process with command `/opt/couchdb/bin/couchdb`
2019-02-28T18:02:53.540759+00:00 heroku[web.1]: State changed from starting to crashed
2019-02-28T18:02:53.517057+00:00 heroku[web.1]: Process exited with status 1
2019-02-28T18:02:53.453924+00:00 app[web.1]: [WARN  tini (4)] Tini is not running as PID 1 and isn't registered as a child subreaper.
2019-02-28T18:02:53.453944+00:00 app[web.1]: Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
2019-02-28T18:02:53.453960+00:00 app[web.1]: To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
2019-02-28T18:02:53.454218+00:00 app[web.1]: find: 'couchdb' is not the name of a known user

我做错了什么?我该如何更改Heroku的端口?使用Heroku时是否需要更改沙发床设置才能使用HTTPS?

更新

我现在发现根目录下的映像中有一个名为docker-entrypoint.sh的文件。在此文件中有以下行:

find /opt/couchdb \! \( -user couchdb -group couchdb \) -exec chown -f couchdb:couchdb '{}' +

所以在这一行上,我认为它在heroku中崩溃了。因此,用户ouchdb存在问题。它在本地有效,我可以通过以下方式找到用户:

cut -d: -f1 /etc/passwd

但是在heroku上,该用户不存在或找不到。为什么?

更新2

答案在这里:https://github.com/apache/couchdb-docker/issues/136

0 个答案:

没有答案