-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.static-base
43 lines (33 loc) · 1.82 KB
/
Dockerfile.static-base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM --platform=linux/amd64 docker.io/gentoo/stage3:musl AS builder
RUN PORTAGE_RSYNC_EXTRA_OPTS="-q" emerge --sync
RUN MAKEOPTS="-j$(nproc)" emerge "dev-vcs/git" sys-devel/crossdev
RUN mkdir -p /var/db/repos/crossdev/{profiles,metadata} \
&& echo 'crossdev' > /var/db/repos/crossdev/profiles/repo_name \
&& echo 'masters = gentoo' > /var/db/repos/crossdev/metadata/layout.conf \
&& chown -R portage:portage /var/db/repos/crossdev \
&& printf '[crossdev]\nlocation = /var/db/repos/crossdev\npriority = 10\nmasters = gentoo\nauto-sync = no' > /etc/portage/repos.conf \
&& crossdev --target aarch64-gentoo-linux-musl \
&& crossdev --target riscv64-gentoo-linux-musl
COPY --chown=root:root ./docker/static/portage/package.use \
/etc/portage/package.use
COPY --chown=root:root ./docker/static/portage/package.accept_keywords \
/etc/portage/package.accept_keywords
COPY --chown=root:root ./docker/static/portage/package.use \
/usr/aarch64-gentoo-linux-musl/etc/portage/package.use
COPY --chown=root:root ./docker/static/portage/package.accept_keywords \
/usr/aarch64-gentoo-linux-musl/etc/portage/package.accept_keywords
COPY --chown=root:root ./docker/static/portage/package.use \
/usr/riscv64-gentoo-linux-musl/etc/portage/package.use
COPY --chown=root:root ./docker/static/portage/package.accept_keywords \
/usr/riscv64-gentoo-linux-musl/etc/portage/package.accept_keywords
RUN MAKEOPTS="-j$(nproc)" emerge ">=dev-lang/go-1.23.0"
ARG FFMPEG_VERSION="6.1.1-r8"
# Build for amd64
RUN MAKEOPTS="-j$(nproc)" emerge "=media-video/ffmpeg-${FFMPEG_VERSION}"
# Build for arm64
RUN MAKEOPTS="-j$(nproc)" \
CPU_FLAGS_ARM="v8 vfpv3 neon vfp" \
aarch64-gentoo-linux-musl-emerge "=media-video/ffmpeg-${FFMPEG_VERSION}"
# Build for riscv64
RUN MAKEOPTS="-j$(nproc)" \
riscv64-gentoo-linux-musl-emerge "=media-video/ffmpeg-${FFMPEG_VERSION}"