-
Notifications
You must be signed in to change notification settings - Fork 31
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
Potluck flavours should clean /var/cache/pkg and /var/db/freebsd-update #298
Labels
Comments
Example: --- freebsd-potluck.sh.orig 2024-09-18 09:44:51.529801000 +0000
+++ freebsd-potluck.sh 2024-09-18 09:45:20.486070000 +0000
@@ -84,6 +84,10 @@
service sshd onestop || true
service sshd onedisable || true
+step "Clean freebsd-update"
+rm -rf /var/db/freebsd-update
+mkdir -p /var/db/freebsd-update
+
step "Create /usr/local/etc/rc.d"
mkdir -p /usr/local/etc/rc.d
@@ -115,7 +119,7 @@
pkg install -y rsync
step "Clean package installation"
-pkg clean -y
+pkg clean -ay
# -------------- END PACKAGE SETUP ------------- and --- mariadb.sh.orig 2024-09-18 09:46:08.726728000 +0000
+++ mariadb.sh 2024-09-18 09:46:28.730563000 +0000
@@ -83,6 +83,10 @@
step "Create /usr/local/etc/rc.d"
mkdir -p /usr/local/etc/rc.d
+step "Clean freebsd-update"
+rm -rf /var/db/freebsd-update
+mkdir -p /var/db/freebsd-update
+
# we need consul for consul agent
step "Install package consul"
pkg install -y consul
@@ -131,7 +135,7 @@
pkg install -y syslog-ng
step "Clean package installation"
-pkg clean -y
+pkg clean -ay
step "Create mysql directory"
mkdir -p /var/db/mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed after building a potluck flavour (in this example mariadb), that it keeps packages in /var/cache/pkg after installation. It also keeps /var/db/freebsd-update, in case the pot fbsd-update flavour was run.
This means images are bigger than required.
Example from mariadb on 14.1-RELEASE:
freebsd-update is a bit more complicated, as in my example I inherited it from freebsd-potluck:
As you can see, even though the usage won't go down, REFER went down by over 300MB (so the freebsd base image would shrink by that amount).
The text was updated successfully, but these errors were encountered: