Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create .dockerignore to speedup build. #8338

Closed

Conversation

hloeffler
Copy link

Add a .dockerignore file to speedup docker build by ignoring the ".git" dir.

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@09bcc9e). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #8338   +/-   ##
=========================================
  Coverage          ?   41.67%           
=========================================
  Files             ?      496           
  Lines             ?    65524           
  Branches          ?        0           
=========================================
  Hits              ?    27304           
  Misses            ?    34703           
  Partials          ?     3517

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 09bcc9e...e0a660a. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 1, 2019
@sapk
Copy link
Member

sapk commented Oct 1, 2019

I removed the file .dockerignore specially to be able to build previous version at build stage via build variable with latest Dockerfile. https://github.com/go-gitea/gitea/blob/master/Dockerfile#L21

I personally don't think that this step need a little speed-up but I will not block if others reviewers thinks the opposite. I just give context why we don't have a .dockerignore file.

@hloeffler
Copy link
Author

Thanks for pointing this out.
Than this PR breaks a feature, sorry for that.
I prefer to handle the versions outside the container, but i guess this is personal preferences.
Feel free to close.

@sapk
Copy link
Member

sapk commented Oct 1, 2019

Re-tinking of it, .git folder is needed to calculate GITEA_VERSION inside Makefile. https://github.com/go-gitea/gitea/blob/master/Makefile#L39

@hloeffler hloeffler closed this Oct 1, 2019
@hloeffler hloeffler deleted the hloeffler-patch-dockerignore branch October 1, 2019 17:28
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants