Open asafza opened 2 years ago
See also #223 ; where my last question remains. I can't see how to fix getopt_long parsing with POSIXLY_CORRECT in a way that works both on GNU libc, macos libc, and also Alpine libc. Or maybe I'm just missing something? help!
Note to myself: I could reproduce the problem from source with the following variation on the provided Dockerfile (thanks @asafza ), and failed to fix it when commenting out the main.c call to setenv("POSIXLY_CORRECT", "1", 1);
.
FROM alpine:3.15.4 as build
RUN apk add postgresql-dev openssl-dev krb5-dev ncurses-dev \
build-base linux-headers \
libxml2-dev lz4-dev libxslt-dev libedit-dev readline-dev \
postgresql14 git
COPY ./ /usr/src/pg_auto_failover/
WORKDIR /usr/src/pg_auto_failover
RUN make -s clean
RUN make -s -j8 install
RUN /usr/libexec/postgresql14/pg_autoctl create monitor \
--auth trust \
--ssl-self-signed \
--pgdata monitor \
--pgctl /usr/bin/pg_ctl
When running the following Dockerfile
The
pg_autoctl
command results with