A
A
Alexander2019-03-24 23:02:09
git
Alexander, 2019-03-24 23:02:09

Is it possible to somehow configure git hooks to work with the container?

Greetings.
The operating system has git-scm installed and a docker container with the project folder mounted. Is it possible to somehow set up interaction so that hooks are processed in the container? For example, when making a commit in the OS, the container knew about it and performed certain actions with the attached data.
5c97e160b1d30134552183.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2019-04-30
@codemafia

https://hackernoon.com/using-git-hooks-in-a-docker...

D
Dmitry Shitskov, 2019-03-25
@Zarom

Yes. In the hook script post-commitput, for example, to clear tmp inside the container
docker exec mycontainer rm -r /tmp/*

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question