-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
38 lines (32 loc) · 1.25 KB
/
Dockerfile
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
FROM ghcr.io/grzanka/centos6pyinstaller:main
# build this image with following command
#
# docker build --tag pymchelper .
#
# run docker container to generate single-file binary in `dist` directory for pymchelper/utils/mcscripter.py
#
# docker run -it -v `pwd`/dist:/app/dist pymchelper:latest pyinstaller --add-data 'pymchelper/VERSION:pymchelper' --onefile pymchelper/utils/mcscripter.py
#
# test if produced executable works on some old distro:
#
# docker run -v `pwd`/dist:/test/ ubuntu:16.04 /test/mcscripter --version
# pymchelper package and deps installation
# files and directories below are needed to install pymchelper in editable mode
WORKDIR /app
COPY requirements.txt .
COPY setup.py .
COPY README.md .
COPY pymchelper pymchelper
# disable pip cache to save some space
ENV PIP_NO_CACHE_DIR=1
RUN pip install --only-binary h5py,scipy,pillow,numpy,matplotlib -r requirements.txt
# generate static VERSION file
COPY .git .git
RUN ls -alh .git
RUN python3 setup.py --help
# create directory for pymchelper products
RUN mkdir dist
# copy pyinstaller specification files
COPY debian_packages/single_file_executables/my_pyinstaller_utils.py .
COPY debian_packages/single_file_executables/convertmc.spec .
COPY debian_packages/single_file_executables/runmc.spec .