mdcpp / mdoj

Mingdao OnlineJudge, A performant contest management system base on cutting edge stack.
https://mdcpp.github.io/mdoj/
5 stars 1 forks source link

Docker build fail cause by workspace dependency #13

Closed KAIYOHUGO closed 10 months ago

KAIYOHUGO commented 10 months ago

Docker build fail because current Dockerfile only copy member folder.

TODO List

Eason0729 commented 10 months ago

I attempted to fix it(untested) by copying Cargo.toml(cp ../Cargo.toml ws-Cargo.toml) to use it in Dockerfile, which look like this:

WORKDIR /complier/proto
COPY backend.proto .
COPY judger.proto .

WORKDIR /compiler
COPY ws-Cargo.toml Cargo.toml

WORKDIR /complier/backend
COPY . .

I committed it directly in master as there is no breaking change.

Also, I just forget to add cp ../Cargo.toml ws-Cargo.toml in backend/justfile.

Eason0729 commented 10 months ago
docker build -f /path/to/Dockerfile /path/to/context/folder

can be a nice solution

KAIYOHUGO commented 10 months ago

Ok, I will fix this, but I mentioned this solution a long time ago.

KAIYOHUGO commented 10 months ago

I think it has been fix in fc5636b