Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6e2373f

Browse files
authored
Merge pull request #478 from pre-commit/docker_build_old_docker
Put the `.` in docker build at the end.
2 parents 3986db8 + 8c27f2c commit 6e2373f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pre_commit/languages/docker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ def build_docker_image(repo_cmd_runner, **kwargs): # pragma: windows no cover
4343
pull = kwargs.pop('pull')
4444
assert not kwargs, kwargs
4545
cmd = (
46-
'docker', 'build', '.',
46+
'docker', 'build',
4747
'--tag', docker_tag(repo_cmd_runner),
4848
'--label', PRE_COMMIT_LABEL,
4949
)
5050
if pull:
5151
cmd += ('--pull',)
52+
# This must come last for old versions of docker. See #477
53+
cmd += ('.',)
5254
helpers.run_setup_cmd(repo_cmd_runner, cmd)
5355

5456

0 commit comments

Comments
 (0)