[PR #216] [MERGED] Copy project into image instead of cloning to avoid stale images on Docker Hub #4108

Closed
opened 2026-03-15 01:26:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/216
Author: @bltavares
Created: 4/12/2019
Status: Merged
Merged: 4/12/2019
Merged by: @pirate

Base: masterHead: master


📝 Commits (1)

  • e9f9c1e Copy project into image instead of cloning

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 Dockerfile (+2 -2)

📄 Description

Docker RUN statements cache based on the text of the command executed,
not the content of what it does to the image.

Since the command was cloning the project, and the text didn't change,
building the image would not update the code if the image was already
cached. This lead to a stale Docker image distributed on Docker Hub.

This could also cause some confusion, as modified code would not show up
on the image during the build process.

This commit changes the build process to copy the content of the project
into the image. Whenever a file changes it will trigger a new updated
image.

IMPORTANT: Do not submit PRs with only formatting / PEP8 / line length changes, I will close them with great prejudice. The PEP8 checks I don't follow are intentional. PRs for minor bugfixes, typos, etc are fine.

Changes these areas

  • Bugfixes
  • Feature behavior
  • Command line interface
  • Configuration options
  • Internal architecture
  • Archived data layout on disk

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ArchiveBox/ArchiveBox/pull/216 **Author:** [@bltavares](https://github.com/bltavares) **Created:** 4/12/2019 **Status:** ✅ Merged **Merged:** 4/12/2019 **Merged by:** [@pirate](https://github.com/pirate) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`e9f9c1e`](https://github.com/ArchiveBox/ArchiveBox/commit/e9f9c1ec5da2433ef95b23d7526d69458e01ad3c) Copy project into image instead of cloning ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+2 -2) </details> ### 📄 Description Docker `RUN` statements cache based on the text of the command executed, not the content of what it does to the image. Since the command was cloning the project, and the text didn't change, building the image would not update the code if the image was already cached. This lead to a stale Docker image distributed on Docker Hub. This could also cause some confusion, as modified code would not show up on the image during the build process. This commit changes the build process to copy the content of the project into the image. Whenever a file changes it will trigger a new updated image. **IMPORTANT: Do not submit PRs with only formatting / PEP8 / line length changes, I will close them with great prejudice. The PEP8 checks I don't follow are intentional. PRs for minor bugfixes, typos, etc are fine.** # Changes these areas - [x] Bugfixes - [ ] Feature behavior - [ ] Command line interface - [ ] Configuration options - [ ] Internal architecture - [ ] Archived data layout on disk --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 01:26:55 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#4108
No description provided.