-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.alpine
41 lines (32 loc) · 1.05 KB
/
Dockerfile.alpine
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
41
########################################################################
# This bit stolen from https://github.com/six8/pyinstaller-alpine, but
# modified to use python 3.5 instead
# Official Python base image is needed or some applications will segfault.
FROM python:3.5-alpine
# 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
# Build bootloader for alpine
RUN git clone https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller \
&& cd /tmp/pyinstaller/bootloader \
&& python ./waf configure --no-lsb all \
&& pip install .. \
&& rm -Rf /tmp/pyinstaller
########################################################################
RUN apk -U add \
make \
bash
WORKDIR /src
COPY requirements.txt /src/
RUN pip3 install -r requirements.txt
COPY . /src/
RUN make build && cp dist/cogctl /usr/bin