docker_practice/image/dockerfile/workdir.md

19 lines
1.5 KiB
Go
Raw Normal View History

### WORKDIR
`WORKDIR <工作目录路径>`
使 `WORKDIR` `WORKDIR`
`Dockerfile` Shell
2017-11-23 23:48:52 +08:00
```docker
RUN cd /app
RUN echo "hello" > world.txt
```
2017-11-23 23:48:52 +08:00
`Dockerfile` `/app/world.txt` `hello` Shell `Dockerfile` `RUN` `Dockerfile`
`RUN` `RUN cd /app`
使 `WORKDIR`