This commit is contained in:
parent
eac1da6350
commit
ad8422827d
45
.drone.yml
Normal file
45
.drone.yml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build_and_publish_tag
|
||||||
|
image: plugins/docker:linux-amd64
|
||||||
|
settings:
|
||||||
|
force_tag: true
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
registry: git.argideli.com
|
||||||
|
repo: git.argideli.com/quertex/docker-win-pyinstaller
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
- ${DRONE_TAG}
|
||||||
|
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: build_and_publish
|
||||||
|
image: plugins/docker:linux-amd64
|
||||||
|
settings:
|
||||||
|
force_tag: true
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
registry: git.argideli.com
|
||||||
|
repo: git.argideli.com/quertex/docker-win-pyinstaller
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- cron
|
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
ARG PYTHON_VERSION=3.11.7
|
||||||
|
ARG PYTHON_URL=https://www.python.org/ftp/python/${PYTHON_VERSION}/python-3.11.7.exe
|
||||||
|
ENV WINEDEBUG=fixme-all
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
apk -U add wine && \
|
||||||
|
for i in core dev exe lib path pip ; do \
|
||||||
|
wget -O "/tmp/python_$i.msi" -c "https://www.python.org/ftp/python/${PYTHON_VERSION}/win32/$i.msi" ; \
|
||||||
|
wine msiexec /i "/tmp/python_$i.msi" /qb TARGETDIR=C:/python && \
|
||||||
|
rm "/tmp/python_$i.msi" ; \
|
||||||
|
done && \
|
||||||
|
wine c:/python/python.exe -m pip install pyinstaller && \
|
||||||
|
mkdir -p /src /out
|
25
README.md
25
README.md
@ -1,2 +1,25 @@
|
|||||||
# docker-win-pyinstaller
|
# wine python windows builder
|
||||||
|
|
||||||
|
Python for windows container.
|
||||||
|
|
||||||
|
## usage
|
||||||
|
|
||||||
|
example `.drone.yaml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: docker.asperti.com/paspo/python-windows-builder
|
||||||
|
pull: always
|
||||||
|
commands:
|
||||||
|
# add dependancy
|
||||||
|
- wine c:/python/python.exe -m pip install cryptography
|
||||||
|
# prepare output directory
|
||||||
|
- mkdir -p /drone/src/out/
|
||||||
|
# build
|
||||||
|
- wine c:/python/Scripts/pyinstaller.exe --onefile --distpath z:/drone/src/out z:/drone/src/prepara_xml.py
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user