Skip to content

Dockerfile: set code dir as git safe directory#3115

Merged
thaJeztah merged 1 commit intomoby:masterfrom
crazy-max:dev-disable-vcs
Feb 7, 2023
Merged

Dockerfile: set code dir as git safe directory#3115
thaJeztah merged 1 commit intomoby:masterfrom
crazy-max:dev-disable-vcs

Conversation

@crazy-max
Copy link
Copy Markdown
Member

@crazy-max crazy-max commented Feb 4, 2023

follow-up #3114

https://github.com/moby/swarmkit/actions/runs/4090832788/jobs/7054522808#step:5:12

docker run -t -v swarmkit-cache:/go -v /home/runner/work/swarmkit/swarmkit/:/go/src/github.com/docker/swarmkit moby/swarmkit make coverage
error obtaining VCS status: exit status 128
	Use -buildvcs=false to disable VCS stamping.

Looks to be the same issue as moby/moby#44930.

- What I did

Set code dir as git safe directory in the Dockerfile

- How I did it

- How to test it

- Description for the changelog

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 4, 2023

Codecov Report

Merging #3115 (9850df9) into master (30042f3) will increase coverage by 61.81%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master    #3115       +/-   ##
===========================================
+ Coverage        0   61.81%   +61.81%     
===========================================
  Files           0      153      +153     
  Lines           0    31099    +31099     
===========================================
+ Hits            0    19224    +19224     
- Misses          0    10323    +10323     
- Partials        0     1552     +1552     

@crazy-max crazy-max marked this pull request as ready for review February 4, 2023 14:42
@thaJeztah
Copy link
Copy Markdown
Member

Any idea why we need to set it here? (I recall I needed it somewhere in the past, but don't recall the details 🤔)

@thaJeztah thaJeztah closed this Feb 6, 2023
@thaJeztah thaJeztah reopened this Feb 6, 2023
@crazy-max
Copy link
Copy Markdown
Member Author

crazy-max commented Feb 6, 2023

@thaJeztah Wonder if this is linked to moby/moby#44929 (comment) so git fails. Will see if making it as safe directory solves the issue.

Edit: Looks good as safe dir.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max crazy-max changed the title Dockerfile: disable buildvcs in dev stage Dockerfile: set code dir as git safe directory Feb 6, 2023
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@thaJeztah
Copy link
Copy Markdown
Member

Gonna bring this one in; CircleCI failure is unrelated, and we'll be removing it either way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants