@@ -3,23 +3,28 @@ FROM postgres:${PG_VERSION}-alpine
33ENV LANG= C.UTF -8 PGDATA= /pg/data
44
55RUN if [ " ${CHECK_CODE}" = " clang" ] ; then \
6- echo 'http://dl-3.alpinelinux.org /alpine/edge/main' > /etc/apk/repositories; \
7- apk --no-cache add clang-analyzer make musl-dev gcc; \
6+ # echo 'http://dl-3.alpinelinux.org /alpine/edge/main' > /etc/apk/repositories; \
7+ # Use alpine/v3.6 /main instead of alpine/edge/main to fix version of clang to '8. *. *'
8+ apk --no-cache add clang-analyzer make musl-dev gcc --repository http://dl-cdn.alpinelinux.org /alpine/v3.6 /main; \
89 fi
910
1011RUN if [ " ${CHECK_CODE}" = " cppcheck" ] ; then \
1112 apk --no-cache add cppcheck --repository http://dl-cdn.alpinelinux.org /alpine/v3.6 /community; \
1213 fi
1314
1415RUN if [ " ${CHECK_CODE}" = " false" ] ; then \
15- echo 'http://dl-3.alpinelinux.org /alpine/edge/main' > /etc/apk/repositories; \
16- apk --no-cache add curl python3 gcc make musl-dev;\
16+ # echo 'http://dl-3.alpinelinux.org /alpine/edge/main' > /etc/apk/repositories; \
17+ # Use alpine/v3.6 /main instead of alpine/edge/main to fix version of clang to '8. *. *'
18+ # Install clang as well, since LLVM is enabled in PG_VERSION >= 11 by default
19+ apk --no-cache add curl python3 gcc make musl-dev llvm clang clang-dev \
20+ --repository http://dl-cdn.alpinelinux.org /alpine/v3.6 /community \
21+ --repository http://dl-cdn.alpinelinux.org /alpine/v3.6 /main; \
1722 fi
1823
19- RUN mkdir -p /pg/data && \
24+ RUN mkdir -p $ {PGDATA} && \
2025 mkdir /pg/src && \
2126 chown postgres:postgres $ {PGDATA} && \
22- chmod a+rwx /usr/local/lib/postgresql && \
27+ chmod -R a+rwx /usr/local/lib/postgresql && \
2328 chmod a+rwx /usr/local/share/postgresql/extension
2429
2530ADD . /pg/src
0 commit comments