Skip to content
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

Reduce size of docker image #134

Open
neteler opened this issue Jan 5, 2021 · 2 comments
Open

Reduce size of docker image #134

neteler opened this issue Jan 5, 2021 · 2 comments
Labels
cicd related to pipelines, GHA, docker, ...

Comments

@neteler
Copy link
Member

neteler commented Jan 5, 2021

Leftover openjdk8-...apk files in docker image
In this Dockerfile section openjdk8 packages are fetched:

https://github.com/mundialis/actinia_core/blob/fdc0d91d83a528a0584cf206f701a057ba01bb6d/docker/actinia-core-alpine/Dockerfile_runtime_pkgs#L99

but later not removed so that they remain in the docker image:

actinia:~$ docker exec -it 0cef  sh # dev
/src/actinia_core # cd /
/ # ls -la
total 62056
drwxr-xr-x   1 root root     4096 Jan  5 07:48 .
drwxr-xr-x   1 root root     4096 Jan  5 07:48 ..
-rwxr-xr-x   1 root root        0 Jan  5 07:48 .dockerenv
drwxr-xr-x   6 root root     4096 Dec 22 15:48 actinia_core
drwxr-xr-x   1 root root     4096 Oct 19 12:15 bin
drwxr-xr-x   1 root root     4096 Dec 22 15:46 build
drwxr-xr-x   5 root root      340 Jan  5 07:49 dev
drwxr-xr-x   1 root root     4096 Jan  5 07:49 etc
drwxr-xr-x   2 root root     4096 Dec 22 16:32 grassdb
drwxr-xr-x   2 root root     4096 May 29  2020 home
drwxr-xr-x   1 root root     4096 Oct 19 12:36 lib
drwxr-xr-x   5 root root     4096 May 29  2020 media
drwxr-xr-x   1 root root     4096 Jan  5 07:49 mnt
-rw-r--r--   1 root root 15755870 Oct 19 12:15 openjdk8-8.232.09-r0.apk
-rw-r--r--   1 root root   358826 Oct 19 12:15 openjdk8-jre-8.232.09-r0.apk
-rw-r--r--   1 root root  4591079 Oct 19 12:16 openjdk8-jre-base-8.232.09-r0.apk
-rw-r--r--   1 root root 42744528 Oct 19 12:16 openjdk8-jre-lib-8.232.09-r0.apk

Low prio but a bit of space could be saved removing them in the right moment (maybe already in line 103?) :-)

@mmacata mmacata added the cicd related to pipelines, GHA, docker, ... label Apr 8, 2021
@anikaweinmann
Copy link
Member

Also the /build/ folder is not removed so that it remain in the docker image:

docker run -it mundialis/actinia-core:0.99.24 -i
/src/actinia_core # ls -lah  /build/
total 608K
drwxr-xr-x 1 root root 4.0K Mar 11 08:24 .
drwxr-xr-x 1 root root 4.0K Apr  8 08:46 ..
-rw-r--r-- 1 root root 270K Mar 11 08:23 actinia_core-0.99.24-py2.py3-none-any.whl
-rw-r--r-- 1 root root  68K Mar 11 07:38 actinia_metadata_plugin.wsgi-1.0.0-py2.py3-none-any.whl
-rw-r--r-- 1 root root 184K Mar 11 07:38 actinia_module_plugin.wsgi-1.0.1-py2.py3-none-any.whl
-rw-r--r-- 1 root root  45K Mar 11 07:38 actinia_satellite_plugin-0.0.2-py2.py3-none-any.whl
-rw-r--r-- 1 root root  27K Mar 11 07:38 actinia_statistic_plugin-0.0.2-py2.py3-none-any.whl

@mmacata mmacata changed the title Leftover openjdk8-...apk files in docker image Reduce size of docker image Sep 22, 2021
@mmacata mmacata added this to To do in endurance run Jan 5, 2022
@mmacata mmacata moved this from To do to next codesprint in endurance run Jan 5, 2022
@mmacata
Copy link
Member

mmacata commented Apr 29, 2022

The openjdk8 packages are removed now as the new alpine uses a more recent version and this fix is no longer necessary. The /build/ files still exist. But they are only 856K in size and compared to the total size of ~3.12GB this is fine.

Will leave this ticket open nevertheless, due to the not little size it makes sense to look for options to increase the size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cicd related to pipelines, GHA, docker, ...
Projects
No open projects
endurance run
next codesprint
Development

No branches or pull requests

3 participants