Skip to content

Commit

Permalink
store mock cache outside of container to speed up repeated build
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Licour committed May 3, 2015
1 parent 34b19a6 commit a5edb78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ RUN usermod -a -G mock builder

VOLUME ["/rpmbuild"]

# create mock cache on external volume to speed up build
RUN install -g mock -m 2775 -d /rpmbuild/cache/mock
RUN echo "config_opts['cache_topdir'] = '/rpmbuild/cache/mock'" >> /etc/mock/site-defaults.cfg

ADD ./build-rpm.sh /build-rpm.sh
RUN chmod +x /build-rpm.sh
#RUN setcap cap_sys_admin+ep /usr/sbin/mock
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ chown -R 1000:1000 /tmp/rpmbuild
```
In this folder you can put the src.rpms to rebuild.

This folder will also store mock cache directories that allow to speed up repeated build

## Execute the container to build RPMs

To execute the docker container and rebuild RPMs four SRPMs you can run it in this way:
Expand Down

0 comments on commit a5edb78

Please sign in to comment.