View Single Post
Old 2017-02-09, 00:59   #13
Dec 2016

7×11 Posts

I have a pretty well-automated version now: To build PFGW with Docker, get and extract the sources of PFGW. In the directory with the sources, create a Dockerfile with this content:
FROM gcc
RUN apt-get update && apt-get install -y libgmp-dev wget unzip

RUN mkdir /usr/src/mprime && \
    cd /usr/src/mprime && \ 
    # openpfgw insists on version 28.6
    wget -O --quiet && \
    # unzip produces some warnings and therefore has exit code 1.
    unzip ; \
RUN cd /usr/src/mprime/gwnum && \
    make -j -f make64

COPY . /usr/src/openpfgw
WORKDIR /usr/src/openpfgw
RUN cp /usr/lib/x86_64-linux-gnu/libgmp.a packages/gmp/64bit/
RUN cp /usr/src/mprime/gwnum/gwnum.a packages/gwnum/64bit/gwnum.a
RUN sed -i 's/-Wl,-no_pie//g' makefile

RUN make -j
Run "docker build -t pfgw ." (mind the dot at the end) to build a new image. Then "docker run -it pfgw" to start a container with that image. The executable is at /usr/src/openpfgw/pfgw64 and it actually works.

This assumes "#include <ctype.h>" fix to PFGW is already applied.
nordi is offline   Reply With Quote