Reorganizing everything under a single repo

This commit is contained in:
Adsooi 2024-09-19 19:03:32 +02:00
parent 8077e80497
commit 9fa96ef8dc
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
10 changed files with 84 additions and 58 deletions

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021-2024 Ad5001, 2016 Chris R
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,12 +1,28 @@
# accountfree-docker # docker-ubuntu-pyside-xvfb
--- ---
This repository contains the Dockerfiles required to build AccountFree: This repository contains the Dockerfiles required to build all tags on [Docker Hub](https://hub.docker.com/repository/docker/ad5001/ubuntu-pyside-xvfb/):
- ubuntu-pyside6-xvfb: Ubuntu jammy base containing PySide6 (Qt for Python) & Xvfb (virtual X server that does not require a display).
- ubuntu-pyside6-xvfb-wine: Contains the latest wine installation, with Windows python3, PySide6 & pyinstaller + Xvfb. All tags come with:
- ubuntu-pyside2-xvfb: Ubuntu focal base containing PySide2 (Qt for Python) & Xvfb (virtual X server that does not require a display).
- ubuntu-pyside2-xvfb-wine: Contains the latest wine installation, with Windows python3, PySide2 & pyinstaller + Xvfb. - a version of Python (v3.12 for PySide6, v3.10 for PySide2)
- accountfree-build-img: Based on ubuntu-pyside2-xvfb, contains AccountFree dependencies to build it's Linux packages. - the tagged version of PySide2/6.
- accountfree-build-img: Based on ubuntu-pyside2-xvfb-wine, contains AccountFree dependencies to build it's Windows installer. - Python packages: `pip`, `requests`, `packaging`, `pytest` (+ `pytest-cov` + `pytest-qt`)
- `xvfb`, `xdotool`, and `wmctrl`.
The linux tags have the following:
- a Ubuntu base (noble for PySide6 and jammy for PySide2)
- python3 is available under `/usr/bin/python3`.
- External pip management disabled (allows you to install packages from pip directly).
- `make`, `git`, `rpm`, and `dh-python`.
The wine tags have the following:
- The latest `winehq-staging` under a Ubuntu base.
- `/usr/bin/python` calling `python3` under wine.
- `/usr/bin/pip` calling `pip` under wine.
- `/usr/bin/pyinstaller` calling `pyinstaller` under wine.
- `wget`, `curl`, `git`, `p7zip-full`, `unzip` and `nsis`.
Additionally, the LaTeX linux tag include a full TeXlive installation including `dvipng` and the latex extras.
NOTE: In Docker, use xvfb-run to run a program within a Xvfb server. NOTE: In Docker, use xvfb-run to run a program within a Xvfb server.

View file

@ -1,15 +0,0 @@
FROM ad5001/ubuntu-pyside2-xvfb-wine:win7-5.15.2
RUN apt-get update \
&& apt install unzip nsis curl -y
RUN apt clean
# Installing tor
RUN wget https://dist.torproject.org/torbrowser/10.5.4/tor-win64-0.4.5.9.zip \
&& ls -la \
&& unzip tor-win64-0.4.5.9.zip -x Data/* \
&& rm tor-win64-0.4.5.9.zip \
&& mv Tor /wine/drive_c/
RUN wine reg ADD "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" /v PATH /f /t REG_EXPAND_SZ /d "C:\windows\system32;C:\windows;C:\windows\system32\wbem;C:\Tor"
# Installing dependencies
RUN pip install packaging websocket-client pywin32 stem requests

View file

@ -1,8 +0,0 @@
FROM ad5001/ubuntu-pyside2-xvfb:hirsute-5.15.2
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
RUN apt-get update && apt-get upgrade -y \
&& apt-get -y install tor qml-module-qtqml-models2 qml-module-qtquick-controls python3-stdeb python-all python3-requests python3-stem rpm dh-python
RUN pip3 install packaging websocket-client

14
pyside2-linux/Dockerfile Normal file
View file

@ -0,0 +1,14 @@
FROM ubuntu:jammy # Jammy uses python3.10 and not 3.12, which is not compatible with PySide2.
ARG DEBIAN_FRONTEND=noninteractive
ARG PYSIDE2_VERSION=5.15.2.1
ENV TZ=Europe/Paris
RUN apt-get update
RUN apt-get -y install make git rpm dh-python \
xvfb xdotool wmctrl \
python3 python3-pip python3-stdeb python-all python3-requests python3-packaging python3-pip python3-pytest python3-pytest-cov python3-pytestqt \
qml-module-qtquick-controls2 qml-module-qtmultimedia qml-module-qtgraphicaleffects qml-module-qtquick2 qml-module-qtqml-models2 qml-module-qtquick-controls
RUN rm /usr/lib/python3.*/EXTERNALLY-MANAGED # Disable managed environment. We don't care about breaking system packages here.
RUN python3 -m pip install PySide2==$PYSIDE2_VERSION
RUN apt clean

View file

@ -1,14 +1,14 @@
FROM ubuntu:jammy FROM ubuntu:noble
ARG PYSIDE2_VERSION=5.15.2.1 ARG PYSIDE2_VERSION=5.15.2.1
# Adapted rom https://github.com/cdrx/docker-pyinstaller/blob/master/Dockerfile-py3-win64 # Adapted from https://github.com/cdrx/docker-pyinstaller/blob/master/Dockerfile-py3-win64
# Unupdated for a while. # Upstream hasn't been updated for a while.
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
ARG WINE_VERSION=winehq-staging ARG WINE_VERSION=winehq-staging
ARG PYTHON_VERSION=3.9.6 ARG PYTHON_VERSION=3.10.15 # Python3.10 are the last supported version of Python for PySide2.
ARG PYINSTALLER_VERSION=5.0.1 ARG PYINSTALLER_VERSION=5.0.1
# we need wine for this all to work, so we'll use the PPA # we need wine for this all to work, so we'll use the PPA
@ -41,17 +41,17 @@ RUN set -x \
&& winetricks win7 \ && winetricks win7 \
&& for msifile in `echo core dev exe lib path pip tcltk tools`; do \ && for msifile in `echo core dev exe lib path pip tcltk tools`; do \
wget -nv "https://www.python.org/ftp/python/$PYTHON_VERSION/amd64/${msifile}.msi"; \ wget -nv "https://www.python.org/ftp/python/$PYTHON_VERSION/amd64/${msifile}.msi"; \
wine msiexec /i "${msifile}.msi" /qb TARGETDIR=C:/Python39; \ wine msiexec /i "${msifile}.msi" /qb TARGETDIR=C:/Python310; \
rm ${msifile}.msi; \ rm ${msifile}.msi; \
done \ done \
&& cd /wine/drive_c/Python39 \ && cd /wine/drive_c/Python310 \
&& echo 'wine '\''C:\Python39\python.exe'\'' "$@"' > /usr/bin/python \ && echo 'wine '\''C:\Python310\python.exe'\'' "$@"' > /usr/bin/python \
&& echo 'wine '\''C:\Python39\Scripts\easy_install.exe'\'' "$@"' > /usr/bin/easy_install \ && echo 'wine '\''C:\Python310\Scripts\easy_install.exe'\'' "$@"' > /usr/bin/easy_install \
&& echo 'wine '\''C:\Python39\Scripts\pip.exe'\'' "$@"' > /usr/bin/pip \ && echo 'wine '\''C:\Python310\Scripts\pip.exe'\'' "$@"' > /usr/bin/pip \
&& echo 'wine '\''C:\Python39\Scripts\pyinstaller.exe'\'' "$@"' > /usr/bin/pyinstaller \ && echo 'wine '\''C:\Python310\Scripts\pyinstaller.exe'\'' "$@"' > /usr/bin/pyinstaller \
&& echo 'wine '\''C:\Python39\Scripts\pyupdater.exe'\'' "$@"' > /usr/bin/pyupdater \ && echo 'wine '\''C:\Python310\Scripts\pyupdater.exe'\'' "$@"' > /usr/bin/pyupdater \
&& echo 'assoc .py=PythonScript' | wine cmd \ && echo 'assoc .py=PythonScript' | wine cmd \
&& echo 'ftype PythonScript=c:\Python39\python.exe "%1" %*' | wine cmd \ && echo 'ftype PythonScript=c:\Python310\python.exe "%1" %*' | wine cmd \
&& while pgrep wineserver >/dev/null; do echo "Waiting for wineserver"; sleep 1; done \ && while pgrep wineserver >/dev/null; do echo "Waiting for wineserver"; sleep 1; done \
&& chmod +x /usr/bin/python /usr/bin/easy_install /usr/bin/pip /usr/bin/pyinstaller /usr/bin/pyupdater \ && chmod +x /usr/bin/python /usr/bin/easy_install /usr/bin/pip /usr/bin/pyinstaller /usr/bin/pyupdater \
&& (pip install -U pip || true) \ && (pip install -U pip || true) \
@ -75,7 +75,7 @@ RUN set -x \
# Additional data for PySide2 # Additional data for PySide2
RUN apt install -y wget curl p7zip-full git xvfb RUN apt install -y wget curl p7zip-full git unzip nsis xvfb xdotool wmctrl
RUN apt clean RUN apt clean
# Installing pyside2 & pyinstaller # Installing pyside2 & pyinstaller
RUN pip install wheel PySide2==$PYSIDE2_VERSION pyinstaller==$PYINSTALLER_VERSION RUN pip install wheel PySide2==$PYSIDE2_VERSION pyinstaller==$PYINSTALLER_VERSION requests pytest pytest-cov pytest-qt packaging

View file

@ -0,0 +1,6 @@
FROM ad5001/ubuntu-pyside-xvfb:linux-6.7.2
ENV TZ=Europe/Paris
RUN apt-get update
RUN apt-get -y install texlive-base dvipng texlive-latex-extra
RUN apt clean

View file

@ -5,7 +5,9 @@ ARG PYSIDE2_VERSION=6.7.2
ENV TZ=Europe/Paris ENV TZ=Europe/Paris
RUN apt-get update RUN apt-get update
RUN apt-get -y install make git python3-pip python3-pytest python3-pytest-cov python3-pytestqt xvfb xdotool wmctrl libxcb-cursor0 RUN apt-get -y install make git rpm dh-python \
xvfb xdotool wmctrl \
python3 python3-pip python3-stdeb python-all python3-requests python3-packaging python3-pip python3-pytest python3-pytest-cov python3-pytestqt
RUN rm /usr/lib/python3.*/EXTERNALLY-MANAGED # Disable managed environment. We don't care about breaking system packages here. RUN rm /usr/lib/python3.*/EXTERNALLY-MANAGED # Disable managed environment. We don't care about breaking system packages here.
RUN python3 -m pip install PySide6==$PYSIDE2_VERSION RUN python3 -m pip install PySide6==$PYSIDE2_VERSION
RUN apt clean RUN apt clean

View file

@ -75,7 +75,7 @@ RUN set -x \
# Additional data for PySide6 # Additional data for PySide6
RUN apt install -y wget curl p7zip-full git xvfb unzip nsis RUN apt install -y wget curl p7zip-full git unzip nsis xvfb xdotool wmctrl
RUN apt clean RUN apt clean
# Installing pyside6 & pyinstaller # Installing pyside6 & pyinstaller
RUN pip install wheel PySide6==$PYSIDE2_VERSION pyinstaller==$PYINSTALLER_VERSION pytest RUN pip install wheel PySide6==$PYSIDE2_VERSION pyinstaller==$PYINSTALLER_VERSION requests pytest pytest-cov pytest-qt packaging

View file

@ -1,10 +0,0 @@
FROM ubuntu:jammy
ARG DEBIAN_FRONTEND=noninteractive
ARG PYSIDE2_VERSION=5.15.2.1
ENV TZ=Europe/Paris
RUN apt-get update
RUN apt-get -y install make git python3-pip qml-module-qtquick-controls2 qml-module-qtmultimedia qml-module-qtgraphicaleffects qml-module-qtquick2 xvfb xdotool wmctrl
RUN python3 -m pip install PySide2==$PYSIDE2_VERSION
RUN apt clean