cayleygraph / cayley

An open-source graph database
https://cayley.io
Apache License 2.0
14.85k stars 1.25k forks source link

Unable to enter the container #892

Closed zdYng closed 4 years ago

zdYng commented 4 years ago

[root@test ~]# docker run -p 64210:64210 -d cayleygraph/cayley:v0.7.5 30a8ff783ce6eb54e7c78a6366aa7ae6524c25820e3f02c53b6880be8433d514

[root@test ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 30a8ff783ce6 cayleygraph/cayley:v0.7.5 "cayley http --asset…" 3 seconds ago Up 3 seconds 0.0.0.0:64210->64210/tcp xenodochial_leavitt

[root@test ~]# docker exec -it 30a8ff783ce6 /bin/bash OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"/bin/bash\ ": stat /bin/bash: no such file or directory": unknown

zdYng commented 4 years ago

image 这是什么情况

zdYng commented 4 years ago

What's happening here

dennwc commented 4 years ago

We build a container from scratch to save size, so it doesn't contain the shell even.

Do you want to extract something specific from an image? Maybe I can help to tell where it is, so you can use docker cp to get it.

zdYng commented 4 years ago

Yes, I want to enter the container because some configuration files need to be modified externally

iddan commented 4 years ago

Another option is copying the Cayley binary to a different container:

FROM cayleygraph/cayley:v0.7.6 as cayley

# Any base image you want here
FROM alpine

# Copy the Cayley binary to the image
COPY --from=cayley /bin/cayley /bin/cayley

# Run Cayley
ENTRYPOINT ["cayley", "http", "--host=:64210"]
iddan commented 4 years ago

Closing for now. @zdYng if you still need help feel free to reopen the issue.

lagc03 commented 3 years ago

I tried this method and the web interface does not work, im sure its ported correctly to the host. Anything I could be missing?