Comments (8)
I have done some investigation and the increase of the image size is related to all the packages that got to be installed for being able to install python modules which rely on things like cargo, rust, openssl-dev and so on:
❯ podman history localhost/semaphore-server
ID CREATED CREATED BY SIZE COMMENT
96e8da9d0108 5 minutes ago /bin/sh -c #(nop) CMD [ "/usr/local/bin/se... 0B FROM 346dfc23091c
<missing> 5 minutes ago /bin/sh -c #(nop) ENTRYPOINT ["/sbin/tini"... 0B FROM 96e8da9d0108
<missing> 5 minutes ago /bin/sh -c mkdir /opt/semaphore/venv && ... 515MB FROM 8f79f495a9f5
efda46108e15 6 minutes ago /bin/sh -c #(nop) ENV ANSIBLE_VERSION 9.4.0 0B FROM d231254cd63b
<missing> 6 minutes ago /bin/sh -c #(nop) USER 1001 0B FROM 66bf78857ec4
<missing> 6 minutes ago /bin/sh -c #(nop) WORKDIR /home/semaphore 0B FROM efda46108e15
<missing> 6 minutes ago /bin/sh -c chown -R semaphore:0 /usr/local... 26.3MB FROM 15e486aa2feb
15e486aa2feb 6 minutes ago /bin/sh -c #(nop) COPY file:9de15c57fc07d5... 26.3MB FROM 71fa1182ee64
71fa1182ee64 6 minutes ago /bin/sh -c #(nop) COPY file:73ee5cf0ce3774... 9.22kB FROM 209c4601967b
209c4601967b 6 minutes ago /bin/sh -c #(nop) COPY file:8c8e1eb063ffa2... 3.07kB FROM 27e5a7ea7740
27e5a7ea7740 7 minutes ago /bin/sh -c apk add --no-cache -U bash curl... 1.24GB FROM docker.io/library/alpine:3.19
05455a08881e 4 months ago /bin/sh -c #(nop) CMD ["/bin/sh"] 0B
<missing> 4 months ago /bin/sh -c #(nop) ADD file:37a76ec18f98877... 7.67MB
These tools are required to enable the option to install python packages on demand which many people require for their customization needs.
That's the downside the python modules like cryptography depend on rust:
4350ed42c294:~$ du -sh /usr/lib/* | grep rustlib
487.2M /usr/lib/rustlib
4350ed42c294:~$ du -sh /usr/lib/* | grep python
122.5M /usr/lib/python3.11
4350ed42c294:~$ du -sh /opt/semaphore/venv
475.1M /opt/semaphore/venv
Some cleanup of __pycache__
folders reduces the storage some bits:
$ du -sh /opt/semaphore/venv
$ find /opt/semaphore/venv -iname __pycache__ -type d | xargs rm -rf
$ du -sh /opt/semaphore/venv
475.1M /opt/semaphore/venv
270.6M /opt/semaphore/venv
du -sh /usr/lib/python*
find /usr/lib/python* -iname __pycache__ -type d | xargs rm -rf
du -sh /usr/lib/python*
122.5M /usr/lib/python3.11
97.0M /usr/lib/python3.11
I will put this minor cleanup into a PR.
from semaphore.
It won't reduce the image size a lot, but better than nothing :)
from semaphore.
Reduced start from 2.10.2
from semaphore.
Hmmm... maybe becaus of arm support, see ae04954, right?
from semaphore.
Hmmm... maybe becaus of arm support, see ae04954, right?
This is not related to that, other architectures are simply separate tags which does not affect image sizes for other architectures.
from semaphore.
from semaphore.
Hi @tboerger
I splitted package installation to layers:
cargo
takes 700 mb. I think we should remove it from base image. And build-base
(200 mb) too.
from semaphore.
It can be possible to remove them, if the installation of ansible is done within the same RUN, but since rust is used by multiple python libraries it could be missing for requirements.txt installations at runtime which would require the installation of it based on packages.txt again.
from semaphore.
Related Issues (20)
- Problem: Semaphore download the wrong file from Sonatype Repositories
- Problem: "Task Templates" pages shows "Not Launched" for every tasks except the last one that ran HOT 4
- Problem: Strange behaviour with survey variables in task templates
- Problem: Terraform task run checkboxes HOT 2
- Problem: Unable to modify an inventory entry using absolute path
- Feature: bash scripts should get access to ssh keys
- Problem: Task output not in the correct order
- Problem: 2.10.18 New Template empty
- Problem: "Applications" button does not works (points to `/apps`) HOT 1
- No sudo permissions
- Problem: Email port 465 and from Name not working
- Is ansible semaphore runner can be choosen during every job tasks? HOT 1
- Feature: schedule task to run just once
- Problem: schedules are deleted after (associated) template update HOT 3
- Feature: Amber-Lang support (in the future)
- Feature: Ability to expand the window (task execution and inventory)
- Problem: Ansible Playbook Dry-run "fatal: could not create work tree dir 'repository_3_9': Permission denied"
- Template Creating error + only 2 apps avalible HOT 6
- Survey Variables separate to Task Templates HOT 1
- Problem: Tasks not visible in v2.10.20 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semaphore.