Skip to content

Commit 2904f17

Browse files
committed
Add a static bin build image.
1 parent d6a1cf6 commit 2904f17

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

pyinstaller.Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM alpine:latest as build
2+
3+
RUN apk add --no-cache --virtual build-deps gcc python3-dev musl-dev py3-pip py3-wheel postgresql-dev scons patchelf
4+
RUN mkdir -p /build/dist
5+
WORKDIR /build
6+
RUN pip install --break-system-packages pyinstaller psycopg[binary] staticx
7+
ADD . /build
8+
RUN python3 setup.py bdist_wheel
9+
RUN pyinstaller holdup.spec
10+
RUN staticx /build/dist/holdup /build/dist/holdup-static
11+
RUN /build/dist/holdup --help
12+
RUN /build/dist/holdup-static --help
13+
14+
FROM scratch
15+
COPY --from=build /build/dist/holdup-static /holdup

0 commit comments

Comments
 (0)