Closed zdYng closed 4 years ago
这是什么情况
What's happening here
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.
Yes, I want to enter the container because some configuration files need to be modified externally
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"]
Closing for now. @zdYng if you still need help feel free to reopen the issue.
I tried this method and the web interface does not work, im sure its ported correctly to the host. Anything I could be missing?
[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