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

base nix on ubuntu, no nix-shell for prod image, prod-image 1.47GB #100

Conversation

fdietze
Copy link
Contributor

@fdietze fdietze commented Jun 4, 2024

the production docker image doen't use the nix-shell anymore. We only need the packages without env variables, since nothing needs to be compiled. We also base it on ubuntu, because it is a smaller base system (~25MB) than the nix image was (~200MB). nix garbage collection helps to reduce the nix-store even more.

This brings the production docker-image down from 2.01GB to 1.47GB (save 0.54GB).

No more /bin/sh is needed in the production shell, since we're not using a nix-shell anymore.

@fdietze fdietze changed the title base nix on ubuntu, no nix-shell for prod image base nix on ubuntu, no nix-shell for prod image, prod-image 1.47GB Jun 4, 2024
@fdietze fdietze requested a review from johnwarden June 4, 2024 19:06
@fdietze fdietze added the ready-to-merge-squash Automatically merge with squash label Jun 4, 2024
@mergify mergify bot merged commit b53d4dc into main Jun 6, 2024
4 checks passed
@mergify mergify bot deleted the base-nix-on-ubuntu-no-nix-shell-for-prod-image-fdietze-2024-06-04 branch June 6, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge-squash Automatically merge with squash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants