[FOLIO-1544] switch to Alpine to shrink docker containers Created: 01/Oct/18 Updated: 11/Aug/20 Resolved: 28/Nov/19 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | Continuous Integration |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Task | Priority: | P3 |
| Reporter: | Julian Ladisch | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | back-end, ci, core, platform-backlog, sprint48, sprint49 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | CP: ready for planning | ||||||||||||||||||||||||||||||||||||||||||||
| Development Team: | Core: Platform | ||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Currently all java based docker containers except mod-authtoken are based on folioci/openjdk8-jre that is based on Debian stretch. mod-authtoken is based on folioci/openjdk8-jre-alpine that is based on Alpine. These are the sizes in today's folio/testing vagrant box: vagrant@contrib-jessie:~$ docker images --format "table {{.Repository}}\t{{.Tag}}:\t{{.Size}}" | sort -n -k 3 REPOSITORY TAG: SIZE nginx stable-alpine: 17.4MB stripes latest: 43.4MB folioci/mod-authtoken 2.0.2-SNAPSHOT.30: 115MB folioci/mod-audit-filter 0.0.2-SNAPSHOT.10: 454MB folioci/mod-inventory 9.5.1-SNAPSHOT.104: 459MB folioci/mod-circulation 12.0.1-SNAPSHOT.172: 475MB folioci/mod-codex-ekb 1.0.1-SNAPSHOT.66: 516MB folioci/mod-configuration 5.0.1-SNAPSHOT.47: 516MB folioci/mod-feesfines 14.2.5-SNAPSHOT.13: 516MB folioci/mod-user-import 3.1.1-SNAPSHOT.31: 516MB folioci/mod-calendar 1.0.3-SNAPSHOT.58: 517MB folioci/mod-circulation-storage 6.1.1-SNAPSHOT.117: 517MB folioci/mod-finance 1.0.1-SNAPSHOT.28: 517MB folioci/mod-inventory-storage 12.8.3-SNAPSHOT.164: 517MB folioci/mod-login 4.5.1-SNAPSHOT.23: 517MB folioci/mod-orders-storage 1.0.1-SNAPSHOT.14: 517MB folioci/mod-password-validator 1.0.1-SNAPSHOT.7: 517MB folioci/mod-permissions 5.4.0-SNAPSHOT.31: 517MB folioci/mod-rtac 1.1.1-SNAPSHOT.17: 517MB folioci/mod-template-engine 1.0.0-SNAPSHOT.8: 517MB folioci/mod-users-bl 4.0.3-SNAPSHOT.30: 517MB folioci/mod-vendors 1.0.2-SNAPSHOT.26: 517MB folioci/mod-notify 1.2.0-SNAPSHOT.51: 521MB folioci/mod-tags 0.2.0-SNAPSHOT.27: 521MB folioci/mod-users 15.3.0-SNAPSHOT.46: 521MB folioci/mod-audit 0.0.3-SNAPSHOT.15: 522MB folioci/mod-codex-inventory 1.3.0-SNAPSHOT.59: 522MB folioci/mod-codex-mux 2.2.3-SNAPSHOT.59: 522MB folioci/mod-notes 2.2.0-SNAPSHOT.64: 522MB folioci/mod-login-saml 1.2.1-SNAPSHOT.28: 536MB folioci/mod-kb-ebsco 1.0.2-SNAPSHOT.154: 848MB folioci/mod-graphql 0.1.1000135: 919MB Image size reported by docker images:
Mem usage reported by docker stats after starting the docker container:
There was some discussion on slack |
| Comments |
| Comment by Julian Ladisch [ 02/Oct/18 ] |
|
There were no objections agains Alpine docker containers at today's core backend meeting. |
| Comment by Heikki Levanto [ 02/Oct/18 ] |
|
I think Kurt was right: We did talk about, and maybe tried to use Alpine containers earlier. We should check if there was a good reason not to. John Malconian might know something about it. |
| Comment by John Malconian [ 02/Oct/18 ] |
|
The primary reason if I recall was the embedded postgres issue. I could not make it work it in Alpine and we already had documentation for many modules that included invoking the container at runtime with embedded postgres. |
| Comment by Julian Ladisch [ 02/Oct/18 ] |
|
Using Alpine based containers for our Vagrant boxes does not prevent others from building non-Alpine-based containers. |
| Comment by Jakub Skoczen [ 28/Jan/19 ] |
|
Adam Dickmeiss Julian Ladisch How does the image size converts into mem used? |
| Comment by Marc Johnson [ 26/Feb/19 ] |
|
Jakub Skoczen John Malconian Wayne Schneider Is this something that the core platform team is still actively considering? There are two outstanding pull requests for
|
| Comment by John Malconian [ 26/Feb/19 ] |
|
Marc Johnson I have no objections to using the Alpine base image. |
| Comment by Marc Johnson [ 28/Feb/19 ] |
|
John Malconian Does that mean we want to try it? I can merge the pull requests that Julian Ladisch raised for mod-circulation and mod-inventory? (I haven't tested them) |
| Comment by John Malconian [ 28/Feb/19 ] |
|
Marc Johnson - Let's stagger merging the PRs by a day apart so that we try one at a time. |
| Comment by Jakub Skoczen [ 28/Feb/19 ] |
|
I'm good with that. |
| Comment by Jakub Skoczen [ 28/Feb/19 ] |
|
John Malconian is anyone going to monitor if things are breaking? |
| Comment by Marc Johnson [ 28/Feb/19 ] |
|
John Malconian Julian Ladisch Jakub Skoczen Any preference as to which goes first? |
| Comment by John Malconian [ 28/Feb/19 ] |
|
I think the module changed first is irrelevant. If there are problems, we'll know fairly quickly. |
| Comment by Jakub Skoczen [ 26/Nov/19 ] |
|
David Crossley isn't this done through the latest JDK8 containersupport migration? |
| Comment by David Crossley [ 26/Nov/19 ] |
|
Yes, with
|
| Comment by David Crossley [ 28/Nov/19 ] |
|
Thanks Julian for your useful investigation. |
| Comment by David Crossley [ 28/Nov/19 ] |
|
Closed. This was subsequently handled by
|