Docker: Using COPY when the Dockerfile is located in a subdirectory

前端 未结 2 1056
猫巷女王i
猫巷女王i 2021-02-13 11:16

I\'m building an app using multiple dockerfiles (one for each service). My app\'s directory structure is as follows:

app
├── dockerfiles
│   ├── webserver
│   │          


        
2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-13 11:59

    The scope for the COPY instruction is the folder where Dockerfile is. My suggestion is to change your Dockerfile to public folder and change the instruction to COPY . /var/www/html.

提交回复
热议问题