docker_practice/image/dockerfile/workdir.md

19 lines
1.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### WORKDIR
`WORKDIR <工作目录路径>`
使 `WORKDIR` `WORKDIR`
`Dockerfile` Shell
```docker
RUN cd /app
RUN echo "hello" > world.txt
```
`Dockerfile` `/app/world.txt` `hello` Shell `Dockerfile` `RUN` `Dockerfile`
`RUN` `RUN cd /app`
使 `WORKDIR`