I'm trying to static link postgresql libpq with my program which connects to 
postgresql server, here is my docker file:
    
    
    FROM nimlang/nim:alpine
    
    RUN apk add --no-cache postgresql-dev
    
    ENTRYPOINT ["sh", "-c"]
    
    
    Run

build:
    
    
    docker build  -t pgcompile .
    
    
    Run

compile:
    
    
    docker run --rm -v (pwd):/mypgclient  -w /mypgclient pgcompile "nim c 
--passL:'-static' --passL:'-lpq' -d:release -d:danger -d:nimDebugDlOpen 
mypgclient"
    
    
    Run

This compiles successfully, but I got error:
    
    
    Dynamic loading not supported
    could not load: libpq.so(.5|)
    
    
    Run

What is the problem?

Reply via email to