I am writing a Dockerfile for my project like
RUN git clone https://github.com/CNA/contract.git --depth 1 --branch 20.0 /opt/CNA-contract
I would like to freeze the code at a particular commit. What is the best practice to do something like this in Docker? I see it fairly easy in buildouts something like
git clone https://github.com/CNA/contract.git --depth 1 --branch 20.0 /opt/CNA-contract commit-SHA