Skip to content

Commit

Permalink
only use ccache when building
Browse files Browse the repository at this point in the history
  • Loading branch information
wuputah committed Oct 4, 2024
1 parent 9c845d9 commit 31c068d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@ RUN mkdir /out
RUN chown -R postgres:postgres . /usr/lib/postgresql /usr/share/postgresql /out

USER postgres
# build
RUN --mount=type=cache,target=/ccache/,uid=999,gid=999 make -j$(nproc)
# install into location specified by pg_config for tests
RUN --mount=type=cache,target=/ccache/,uid=999,gid=999 make -j$(nproc) install
RUN make install
# install into /out for packaging
RUN --mount=type=cache,target=/ccache/,uid=999,gid=999 DESTDIR=/out make install
RUN DESTDIR=/out make install

###
### CHECKER
###
FROM builder AS checker

USER postgres
RUN --mount=type=cache,target=/ccache/,uid=999,gid=999 make installcheck
RUN make installcheck

###
### OUTPUT
Expand Down

0 comments on commit 31c068d

Please sign in to comment.