Base gitea on busybox glibc image
Build gitea from busybox glibc image. It gets a little smaller (230M instead of 270M). Added bash, gitea warns if not found.
This commit is contained in:
12
Dockerfile.base.busybox
Normal file
12
Dockerfile.base.busybox
Normal file
@@ -0,0 +1,12 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# gentoo-base-busybox
|
||||
FROM docker.io/gentoo/stage3:nomultilib AS builder
|
||||
|
||||
WORKDIR /workdir
|
||||
COPY --exclude=repos . .
|
||||
COPY repos /var/db/repos
|
||||
RUN echo 'FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox"' >> /etc/portage/make.conf
|
||||
RUN --mount=type=cache,target=/workdir/cache,sharing=locked \
|
||||
/bin/bash src/bootstrap.sh -u -r /var/db/repos/ceamac -p ceamac:linux/arch/amd64/busybox -m make-docker.conf /mnt/gentoo -j12
|
||||
|
||||
CMD ["/bin/sh"]
|
||||
20
Dockerfile.busybox.gitea
Normal file
20
Dockerfile.busybox.gitea
Normal file
@@ -0,0 +1,20 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# gentoo-gitea
|
||||
FROM gentoo-base-busybox AS builder
|
||||
|
||||
WORKDIR /workdir
|
||||
COPY --exclude=repos --exclude=bin . .
|
||||
RUN --mount=type=cache,target=/workdir/cache,sharing=locked <<-EOF
|
||||
echo 'acct-user/git gitea -git' >> /etc/portage/package.use/gitea
|
||||
emerge -1v --quiet-build=y acct-user/git
|
||||
/bin/bash src/setup-gitea.sh /mnt/gentoo -j8
|
||||
EOF
|
||||
|
||||
FROM scratch
|
||||
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"]
|
||||
@@ -8,7 +8,7 @@ imagename="$(basename "${imagedir}")"
|
||||
shift
|
||||
|
||||
usename="${imagedir}"/etc/portage/package.use
|
||||
[[ -d ${usename} ]] && usename="${usename}"/php.conf
|
||||
[[ -d ${usename} ]] && usename="${usename}"/gitea.conf
|
||||
|
||||
cat <<-EOF >> "${usename}"
|
||||
*/* cxx
|
||||
@@ -21,7 +21,7 @@ dev-vcs/git -perl
|
||||
sys-apps/shadow su
|
||||
EOF
|
||||
|
||||
bin/"${imagename}"-emerge -vk "$@" gitea dev-vcs/git-lfs
|
||||
bin/"${imagename}"-emerge -vk "$@" www-apps/gitea dev-vcs/git-lfs app-shells/bash
|
||||
bin/"${imagename}"-emerge -1vuDUk "$@" @world
|
||||
bin/"${imagename}"-emerge -1c --with-bdeps=n "$@"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user