-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.static-windows-base
58 lines (52 loc) · 1.23 KB
/
Dockerfile.static-windows-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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM docker.io/library/golang:1.23.4-bookworm
# https://github.com/mxe/mxe/issues/3059
RUN apt update -y \
&& apt install -y \
mingw-w64 \
autoconf \
automake \
autopoint \
bash \
bison \
bzip2 \
flex \
g++ \
g++-multilib \
gettext \
git \
gperf \
intltool \
libc6-dev-i386 \
libgdk-pixbuf2.0-dev \
libltdl-dev \
libgl-dev \
libssl-dev \
libtool-bin \
libxml-parser-perl \
lzip \
make \
openssl \
p7zip-full \
patch \
perl \
python3 \
python3-mako \
python3-pkg-resources \
python3-packaging \
python-is-python3 \
ruby \
sed \
unzip \
wget \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
RUN cd /opt \
&& git clone https://github.com/mxe/mxe mxe \
&& cd mxe \
&& echo "MXE_TARGETS := x86_64-w64-mingw32.static" >> settings.mk
RUN --mount=type=cache,target=/cache cd /opt/mxe && make gcc MXE_TMP=/cache JOBS=$(nproc) MXE_CCACHE_DIR=/cache
# Patch ffmpeg makefile with ours which disable most dependencies since we don't need them
COPY docker/static-windows/ffmpeg.mk /opt/mxe/src/ffmpeg.mk
RUN --mount=type=cache,target=/cache cd /opt/mxe && make ffmpeg MXE_TMP=/cache JOBS=$(nproc) MXE_CCACHE_DIR=/cache
# For cgo, change original pkg-config
ENV PATH=/opt/mxe/usr/bin:${PATH}