Docker volumes causes server to not respond properly
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 106
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 3
Description
Hey! I got a small problem with running MCHPRS using docker.
When I run the dockerfile that is in the repo using docker-compose everything is fine, but I woud love to have the /data directory to be a volume that is linked to my local machine so I can more easily add and remove schems and configuration.
When I start the container with docker-compose everything seems to work just fine. Everything builds the way it should and everything runs with no problem. But my issue arrives when I try to log into the server. I get a message that I joined the server but the world won’t load and everything seems to be frozen. After a few seconds I get timed out, but the server stays up like nothing happened. It’ll just show a message that I left the server.
Is this a bug or am I doing something wrong (probably the most likely)?
version: "3.9"
services:
mchprs:
container_name: mchprs_server
restart: unless-stopped
build:
context: .
dockerfile: dockerfile
ports:
- "25565:25565"
volumes:
- ./server:/data
FROM rustlang/rust:nightly-slim
RUN apt-get update \
&& apt-get install -y \
git pkg-config libssl-dev
RUN git clone https://github.com/MCHPR/MCHPRS.git
WORKDIR /MCHPRS
RUN cargo install --path . \
&& cargo clean
VOLUME [ "/data" ]
WORKDIR /data
CMD ["mchprs"]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the docker-compose configuration and Dockerfile, focusing on the ./server:/data bind mount, the declared /data volume, and the /data working directory. Reproduce the timeout with the bind mount and inspect the container and server logs; done means the server loads the world and accepts connections while schematics and configuration remain available through the local directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, dockerfile, rust
- Domain
- backend, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100