wechaty / matrix-appservice

Wechaty [Matrix] Application Services Bridge
https://matrix.org/docs/projects/bridge/matrix-appservice-wechaty
Apache License 2.0
133 stars 16 forks source link

Docker entrypoint arguments problem #26

Closed huan closed 4 years ago

huan commented 4 years ago

@ericmigi actually the docker is not starting, it's exiting (0) immediately after I start it @tulir looks like these are the most important changes:

diff --git a/Dockerfile b/Dockerfile
index 79a0ac1..fd61b4b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -30,7 +30,7 @@ RUN sudo chown "$(id -nu)" package.json \
   && rm -fr /tmp/* ~/.npm

 COPY . .
-RUN npm run dist
+RUN npm run dist && cp -a config dist/

 ENTRYPOINT [ "/usr/bin/dumb-init", "--" ]
-CMD [ "node", "dist/bin/matrix-appservice-wechaty" ]
+CMD [ "node", "dist/bin/matrix-appservice-wechaty", "-c", "/data/config.yaml", "-f", "/data/wechaty-registration.yaml", "-p", "8432"]
huan commented 4 years ago

This issue had been fixed after matrix-appservice-wechaty@0.5.8

Now the ENTRYPOINT and CMD in Dockerfiles are:

https://github.com/wechaty/matrix-appservice-wechaty/blob/0955f7ef455c1f6b05ab96e3b3db4c2e2f2ef846/Dockerfile#L37-L38