Change Directory
SH · Navigation & Filescd [directory]cd /var/log
cd ~
cd ..
cd -Note cd with no argument returns to your home directory. cd - switches to the previous directory you were in, which is great for toggling between two locations.
2 snippets across 2 stacks - Bash & Linux, Docker
cd [directory]cd /var/log
cd ~
cd ..
cd -Note cd with no argument returns to your home directory. cd - switches to the previous directory you were in, which is great for toggling between two locations.
WORKDIR /path/to/dirWORKDIR /app
COPY . .
RUN npm ciNote All subsequent RUN, CMD, COPY, and ENTRYPOINT instructions use this directory. WORKDIR creates the directory if it does not exist. Avoid using RUN cd /app - it only affects that single RUN layer.