Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .generator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ RUN tar -xvf pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz -C pandoc-binary --stri
# This needs to be a single command so that the git clone command is not cached
RUN git clone https://github.com/googleapis/synthtool.git synthtool && \
cd synthtool && \
git checkout 5dc7e990bb38ef8bc3d71cae6304e74d3037b9ef
git checkout afd7725f32d522a95e964884e0fba6d0d6b4cb6a
Comment on lines 76 to +78
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better efficiency and smaller Docker image layers, consider downloading a source archive of the specific commit instead of cloning the entire repository history. git clone can be slow and consume significant disk space, especially for repositories with a long history. Using curl to download a .tar.gz archive is much faster and results in a smaller layer.

RUN curl -L https://github.com/googleapis/synthtool/archive/afd7725f32d522a95e964884e0fba6d0d6b4cb6a.tar.gz | tar -xz && \
    mv synthtool-afd7725f32d522a95e964884e0fba6d0d6b4cb6a synthtool


# --- Final Stage ---
# This stage creates the lightweight final image, copying only the
Expand Down
Loading