如何从不在root的dockerfile访问根文件夹
我在我的根文件夹中有一个package.json
。 我有另一个文件夹在根:服务器。 在这个/server
文件夹中,我有一个Dockerfile so /server/Dockerfile
我怎样才能从我的Dockerfile
访问这个package.json
?
build立:
- /资源
- /服务器
- Dockerfile
- 的package.json
你需要有一个构build脚本,它将:
- 复制
/package.json
到/server
文件夹 - 调用
docker build -t xxx .
有一个问题打开请求支持符号链接