This all on one line to keep the number of layers down and keep the size of this container small.
The APK del needs to run on the same line as the add to see a benefit from it.
RUN apk add --no-cache --virtual .build-deps postgresql-dev build-base git && \
git clone https://github.com/pgaudit/pgaudit.git && \
cd pgaudit && \
git checkout REL_13_STABLE && \
make check USE_PGXS=1 && \
make install USE_PGXS=1 && \
apk del .build-deps && \
rm -rf pgaudit
Above make command is failing with below mentioned error:
In file included from /usr/local/include/postgresql/server/libpq/auth.h:17,
[INFO] from pgaudit.c:28:
[INFO] /usr/local/include/postgresql/server/libpq/libpq-be.h:34:10: fatal error: gssapi/gssapi.h: No such file or directory
[INFO] 34 | #include <gssapi/gssapi.h>
[INFO] | ^~~~~
[INFO] compilation terminated.
[INFO]
[INFO] make: *** [: pgaudit.o] Error 1
Hi Team,
Below mentioned is the dockerfile code
FROM postgres:13.13-alpine3.18
This all on one line to keep the number of layers down and keep the size of this container small.
The APK del needs to run on the same line as the add to see a benefit from it.
RUN apk add --no-cache --virtual .build-deps postgresql-dev build-base git && \ git clone https://github.com/pgaudit/pgaudit.git && \ cd pgaudit && \ git checkout REL_13_STABLE && \ make check USE_PGXS=1 && \ make install USE_PGXS=1 && \ apk del .build-deps && \ rm -rf pgaudit
Above make command is failing with below mentioned error: In file included from /usr/local/include/postgresql/server/libpq/auth.h:17, [INFO] from pgaudit.c:28: [INFO] /usr/local/include/postgresql/server/libpq/libpq-be.h:34:10: fatal error: gssapi/gssapi.h: No such file or directory [INFO] 34 | #include <gssapi/gssapi.h> [INFO] | ^: pgaudit.o] Error 1
~~~~ [INFO] compilation terminated. [INFO] [INFO] make: *** [Could please let me know what I am missing here?