This repository has been archived by the owner on May 12, 2021. It is now read-only.
METRON-644 RPM builds only work with Docker for Mac #409
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently using the rpm-docker image to build the project RPMs will only succeed using Docker for Mac due to the way it handles permissions. When using docker-machine/boot2docker, "Bad owner/group" build errors occur due to the SPEC and SOURCE files having an owner uid which does not map to an existing user within the container.
Some background. When using Docker for Mac any volume mounted from the host into the container is munged into being owned by the running user within the container. Hence there are no permissions issues like we see with docker-machine/boot2docker.
Modified the build.sh script to ensure the owner uid of the metron.spec file maps to an existing user in the container and that the rpms post-build are owned by the same user.
Tested on Docker for Mac, docker-machine/boot2docker, and a local docker-engine on Linux. RPMs build as expected in each case.