-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (33 loc) · 1.63 KB
/
Copy pathDockerfile
File metadata and controls
40 lines (33 loc) · 1.63 KB
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
FROM tobix/wine:stable
LABEL org.opencontainers.image.authors="Tobias Gruetzmacher <tobias-docker@23.gs>"
ENV WINEDEBUG=-all
ENV WINEPREFIX=/opt/wineprefix
COPY wine-init.sh SHA256SUMS.txt /tmp/helper/
COPY mkuserwineprefix entrypoint.sh /opt/
# Prepare environment
RUN xvfb-run sh /tmp/helper/wine-init.sh
# renovate: datasource=github-tags depName=python/cpython versioning=pep440
ARG PYTHON_VERSION=3.14.7
# renovate: datasource=github-releases depName=upx/upx versioning=loose
ARG UPX_VERSION=5.1.1
RUN --mount=from=ghcr.io/sigstore/cosign/cosign:v3.1.3@sha256:9e5c2f2edc34351160407ca3416c61855bdf9403c3c5936e0f0be7fc261611b8,source=/ko-app/cosign,target=/usr/bin/cosign \
umask 0 && cd /tmp/helper && \
curl --fail-with-body -LOO \
"https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-amd64.exe{,.sigstore}" \
https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-win64.zip \
&& \
cosign verify-blob --certificate-oidc-issuer https://github.com/login/oauth --certificate-identity-regexp='@python.org$' \
--bundle python-${PYTHON_VERSION}-amd64.exe.sigstore python-${PYTHON_VERSION}-amd64.exe && \
sha256sum -c SHA256SUMS.txt && \
xvfb-run sh -c "\
wine python-${PYTHON_VERSION}-amd64.exe /quiet TargetDir=C:\\Python \
Include_doc=0 InstallAllUsers=1 PrependPath=1; \
wineserver -w" && \
unzip upx*.zip && \
mv -v upx*/upx.exe ${WINEPREFIX}/drive_c/windows/ && \
cd .. && rm -Rf helper
# Install some python software
RUN umask 0 && xvfb-run sh -c "\
wine pip install --no-warn-script-location pyinstaller; \
wineserver -w"
ENTRYPOINT ["/opt/entrypoint.sh"]