Here are a few caveats you should be mindful of:
- Git clone is a shallow clone
- When Aptible ships your git repository to a build instance, it uses a git shallow clone.
- This has no impact on the code being cloned, but you should be mindful that using e.g.
git logwithin your container will yield a single commit: the one you deployed from.
- File timestamps are all set to January 1st, 2000
- Git does not preserve timestamps on files. This means that when Aptible clones a git repository, the timestamps on your files represent when the files were cloned, as opposed to when you last modified them.
- However, Docker caching relies on timestamps (i.e., a different timestamp will break the Docker build cache), so timestamps that reflect the clone time would break Docker caching.
- To optimize your build times, Aptible sets all the timestamps on all files in your repository to an arbitrary timestamp: January 1st, 2000, at 00:00 UTC.
.dockerignoreis not used
.dockerignorefile is read by the Docker CLI client, not by the Docker server.
- However, Aptible does not use the Docker CLI client and does not currently use the