Fix: 修复 noteking-web 构建时的路径冲突报错 ("/web": not found)#3
Open
Dingge01 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
描述:
问题
使用
docker compose build时,noteking-web镜像构建失败,报错提示:failed to calculate checksum of ref... : "/web": not found。原因
构建路径配置冲突:
docker-compose.yml将上下文设置在了./web,但Dockerfile.web里写的是COPY web/ ./。这导致 Docker 实际去./web/web/找文件,从而报错。修复
修改
docker-compose.yml,将web服务的构建上下文重置为根目录,与Dockerfile.web保持一致:context: ./web改为context: .dockerfile: ../Dockerfile.web改为dockerfile: Dockerfile.web已在本地测试构建成功。