When Aptible Deploy builds your Docker image using Dockerfile Deploy, the build context contains the git repository you pushed and a
.aptible.env file injected by Aptible Deploy at the root of your repository.
Here are a few caveats you should be mindful of:
When Aptible Deploy 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 log within you container will yield a single commit: the one you deployed from.
Git does not preserve timestamps on files. This means that when we clone 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 time of clone would break Docker caching.
So, in order to optimize your build times, Aptible Deploy sets all the timestamps on all files in your repository to an arbitrary timestamp: January 1st, 2000, at 00:00 UTC.
.dockerignore file is read by the Docker CLI client, not by the Docker server.
However, Aptible Deploy does not use the Docker CLI client, and does not currently use the
Updated 6 months ago