Commit Graph

18 Commits

Author SHA1 Message Date
Anthony Sottile
0afb95ccca test docker and docker_image directly 2023-02-04 17:22:06 -05:00
marsha
42102a1bfd Remove expected_returncode from CalledProcessError 2022-10-30 15:31:45 -05:00
Anthony Sottile
04de6a2e57 drop python 3.6 support
python 3.6 reached end of life on 2021-12-23
2022-01-18 18:44:20 -05:00
Anthony Sottile
5d1cac64c1 ignore self-container when in docker-in-docker 2021-08-03 13:08:07 -07:00
Adar Nimrod
3e1020945e A more reliable way to get the container id.
The hostname is not always the container id. Get the container id from
/proc/1/cgroup. Fixes #1918.
2021-07-03 10:43:11 -07:00
Oleg Kainov
6d5d386c9f fix: fix path mounting when running in Docker
Currently pre-commit mounts the current directory to /src and uses
current directory name as mount base.
However this does not work when pre-commit is run inside the container
on some mounted path already, because mount points are relative to the
host, not to the container.

Fixes #1387
2021-04-28 19:21:34 -07:00
Ruairidh MacLeod
eb8b48aeb4 remove docker_is_running check from source
Moved to testing.util so it can be used for the skipif_cant_run_docker
test hooks.
2020-08-22 17:33:32 -07:00
KYLE ZHU
23d5b78fdb Don't use --user when running docker on windows 2020-03-19 21:55:16 -07:00
Anthony Sottile
327ed924a3 Add types to pre-commit 2020-01-12 10:15:01 -08:00
Anthony Sottile
ab19b94811 some manual py2 cleanups 2020-01-12 09:27:04 -08:00
Anthony Sottile
30c1e8289f upgrade hooks, pyupgrade pre-commit 2020-01-12 09:27:04 -08:00
Anthony Sottile
b90412742e A few cleanups for CalledProcessError to hopefully make it more readable 2019-12-23 17:46:48 -08:00
Anthony Sottile
f612aeb22b Split out cmd_output_b 2019-10-06 15:16:47 -07:00
Edgar Geier
d4a9ff4d1f Simplify docker user fallback implementation and test 2019-07-25 11:22:59 +02:00
Edgar Geier
a21a4f46c7 Fix missing create=True attribute in docker tests 2019-07-23 15:35:19 +02:00
Edgar Geier
b43b6a61ab Add docker uid and gid fallback tests 2019-07-23 15:14:06 +02:00
Anthony Sottile
0c70fa4229 Use asottile/add-trailing-comma 2017-07-12 18:30:51 -07:00
Ben Picolo
08b379bf45 Coverage complete 2017-01-04 13:16:32 -05:00