forked from six8/pyinstaller-alpine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 931 Bytes
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 931 Bytes
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
ARG PYTHON_VERSION=3.6
ARG ALPINE_VERSION=3.7
# Official Python base image is needed or some applications will segfault.
FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION}
# PyInstaller needs zlib-dev, gcc, libc-dev, and musl-dev
RUN apk --update --no-cache add \
zlib-dev \
musl-dev \
libc-dev \
gcc \
git \
pwgen \
&& pip install --upgrade pip
# Install pycrypto so --key can be used with PyInstaller
RUN pip install \
pycrypto
ARG PYINSTALLER_TAG=v3.3.1
# Build bootloader for alpine
RUN git clone --depth 1 --single-branch --branch $PYINSTALLER_TAG https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller \
&& cd /tmp/pyinstaller/bootloader \
&& python ./waf configure --no-lsb all \
&& pip install .. \
&& rm -Rf /tmp/pyinstaller
WORKDIR /src
ADD ./bin /pyinstaller
RUN chmod a+rx /pyinstaller/*
ENTRYPOINT ["/pyinstaller/pyinstaller.sh"]
CMD ["pyinstaller"]