Compare commits

...

4 Commits

Author SHA1 Message Date
612cfd8ddd Remove /var/db
We don't need /var/db in leaf containers, and it can grow quite big.
2026-01-25 14:22:53 +02:00
2f14c01c40 Use full image name
Uploaded the image to a private registry.
2026-01-25 14:21:23 +02:00
718f21b04e Add more specific -march 2026-01-25 14:20:57 +02:00
6f8ff6d63c Add -Oz to busybox 2026-01-25 14:19:18 +02:00
5 changed files with 7 additions and 2 deletions

View File

@@ -15,5 +15,6 @@ WORKDIR /
EXPOSE 3000 32799
VOLUME ["/etc/gitea", "/var/lib/gitea"]
COPY --from=builder /mnt/gentoo /
RUN rm -fR /var/db
USER git:git
CMD ["/usr/bin/gitea", "web"]

View File

@@ -7,4 +7,5 @@ RUN bin/gentoo-emerge -1c --with-bdeps=n
FROM scratch
WORKDIR /
COPY --from=builder /mnt/gentoo /
RUN rm -fR /var/db
CMD ["/bin/bash"]

View File

@@ -1,6 +1,6 @@
services:
gitea:
image: gentoo-gitea
image: registry.ceamac.ro/gentoo-gitea
restart: always
#user: 196:196
userns: nomap

View File

@@ -1,4 +1,4 @@
COMMON_FLAGS="-O2 -pipe"
COMMON_FLAGS="-O2 -pipe -march=x86-64-v3"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"

View File

@@ -77,6 +77,9 @@ mkdir -p "${imageroot}"/var/db/repos
mkdir -p "${imageroot}"/var/tmp
[[ -e ${makeconf} ]] && cp "${makeconf}" "${imageroot}"/etc/portage/make.conf
mkdir -p "${imageroot}"/etc/portage/env/sys-apps
echo 'CFLAGS="${CFLAGS} -Oz"' >> "${imageroot}"/etc/portage/env/sys-apps/busybox
# addrepoconfs [root]
addrepoconfs() {
repoconf="${imageroot}"/etc/portage/repos.conf/gentoo.conf