-
-
Notifications
You must be signed in to change notification settings - Fork 11
ADD $FIREBIRD_RELEASE_URL /tmp/firebird-bundle.tar.gz increases the volume of containers. #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Good catch, @andreyrogojin! I'll check it out in the next few days. P.S.: PRs are welcome, if you are interested. 😉 |
Sorry, guys. I'm stepping back from this one, for now. The added complexities of maintaining both AMD64 and ARM64 scripts have proven too much to juggle right now. I'm closing this case for the time being. If anyone else wants to take a crack at it, feel free to reopen and jump in. |
If I understand, you said to use wget before Why not just use wget in the RUN command? |
Because that would end up downloading the files inside the container again? 😉 The main challenge here is ensuring the bundle files are available when 1. Multi-stage buildsInitially, I tried to avoid downloading files on the host and instead keep everything self-contained within the container image. To do this, I turned to multi-stage builds. Unfortunately, this approach quickly hit a roadblock: Docker doesn't support "mounting" a folder from one build stage into another (you can only COPY files between stages). And that brings us right back to the original problem. 2. Download the files on host (@andreyrogojin OP idea)Downloading all bundles in docker host first, and then using But this ended up causing additional build issues, while also complicating the build scripts and polluting the Docker host. Ultimately, I decided that the ~10% increase in image size wasn't significant enough to justify the hassle.😅 |
If you download the file, extract, install and delete inside the same RUN command, it will not be stored as a layer. |
Damn... why didn’t anyone ever tell me that before? 😂 Alright, I’ll give it another shot tonight. Appreciate the insight! |
I gave it an initial try, but the image has actually increased in size. 😕 Let’s continue the discussion on #23. |
I think it is possible to optimize the assembly of docker containers. Currently, the firebird installer is loaded by the ADD command into each container separately, while creating a layer in them that is not needed when using, but increases the volume of containers.
Maybe it would be better like this:
And exclude ADD in the dockerfiles, using instead:
RUN --mount=type=bind,from=<path for all>/tmp,dst=/tmp,rw set -eux; cd /tmp; tar --extract ...
You won't need to download the installer for each tag and the size of the containers will decrease.
The text was updated successfully, but these errors were encountered: