Open rrix opened 4 years ago
This will also prevent using custom SDKs in the script/docker-link-repos.sh
too for submodule users, not just the version string script.
my Makefile rule looks like this, to disable these two scripts from the root of my dockerfile repository:
rrix/riot-web: riot-web/*
git -C riot-web/ fetch
git -C riot-web/ checkout ${RIOT_WEB_VERSION}
sed -i -e "/docker-write-version.sh/d" riot-web/Dockerfile
sed -i -e "/docker-link-repos.sh/d" riot-web/Dockerfile
docker build riot-web/ -t rrix/riot-web
With how docker contexts work, there's no way for it to access the parent directory so this seems like quite an incompatibility.
Description
I have a repository where I manage all of my personal services' dockerfiles so that I can build them from source rather than have to worry about Docker, Inc. images in threat models. It's a makefile and a bunch of git submodules.
When riot-web is added a submodule,
.git
looks like this:the
Dockerfile
copies the source in to the container, including this submodule stub, but obviously not the .git directory itself. I believe I could work around this by converting it to a git subtree, but this feels like a bad compromise, I am using submodules in their intended usecase right now.Since this is a personal build for one user, I am comfortable simply removing the RUN docker-write-version command, but perhaps there's a solution to this worth considering, or at least documenting for the next person to try to do this.
Steps to reproduce
Version information
For the web app: