Open
Conversation
I've provided a simpler approach to running grumphp inside a docker container. I've provided details to the project itself, for others to see here: phpro/grumphp#618 (comment). I'm sharing this knowledge back with your project, as reviewing how you got it working helped me out.
Corrected command from pre-commit to commit-msg
danielozano
reviewed
May 3, 2019
config/grumphp/hooks/commit-msg
Outdated
| 'cd "${HOOK_EXEC_PATH}" && cat "/tmp/${DIFF_FILE}" | ${HOOK_COMMAND} --git-user="${GIT_USER}" --git-email="${GIT_EMAIL}" "${COMMIT_MSG_FILE}"' | ||
| GRUMPHP_EXIT_CODE=$? | ||
| (cd "./" && echo "${DIFF}" | \ | ||
| exec 'docker' 'run' '--rm' '-t' "--volume=$PWD:${HOOK_EXEC_PATH}" "${DOCKER_PHP_CONTAINER_ID}" \ |
Member
There was a problem hiding this comment.
Hi @ryantfowler this one is also failing for the same reason as #44:
docker: Error: No such image: 62a2c063b218ae30c8f8656487771e158671b5d5390791ac578341649d9eb662.
See 'docker run --help'.
I think that docker run expects an image identifier instead of a container id: "${DOCKER_PHP_CONTAINER_ID}"
Updated the file to reflect correct command. Also, there's this phpro/grumphp#621 coming up
Author
|
@danielozano I've updated the PR, thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I've provided a simpler approach to running grumphp inside a docker container. I've provided details to the project itself, for others to see here. I'm sharing this knowledge back with your project, as reviewing how you got it working helped me out.