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

Add dockerignore file #4765

Merged
merged 6 commits into from
Apr 8, 2022
Merged

Add dockerignore file #4765

merged 6 commits into from
Apr 8, 2022

Conversation

javierm
Copy link
Member

@javierm javierm commented Dec 29, 2021

Objectives

  • Avoid adding confidential information to a Docker image
  • Make the process to build a Docker images faster and generate a much smaller image
  • Remove unneeded lines in the .gitignore file
  • Reorganize .gitignore file so it's easier to read

@javierm javierm added the Devops label Dec 29, 2021
@javierm javierm self-assigned this Dec 29, 2021
@javierm javierm added this to Reviewing in Consul Democracy via automation Dec 29, 2021
@taitus taitus self-assigned this Jan 10, 2022
Consul Democracy automation moved this from Reviewing to Testing Jan 10, 2022
@javierm javierm marked this pull request as draft January 10, 2022 14:09
This was referenced Mar 29, 2022
We don't use SQLite and we don't support it, so these files shouldn't
exist in the first place.
We can't cover the files for every editor out there, so we're removing
it in the name of neutrality. Developers using this editor to work with
CONSUL can add the `.idea` to their global gitignore configuration (on
GNU/Linux systems, for instance, the `~/.config/git/ignore` file).
We used a slash as a prefix in some cases but not in other cases. Now
we're defining files and folders following the gitignore rules: files
starting with a slash are only ignored in the root folder, while files
not starting with it are ignored everywhere.

IMHO it makes sense to ignore all folders named `tmp`, `.bundle`, `log`,
`.DS_Store` or `.ruby-gemset` everywhere in the source code and not only
in the root folder.

We're also adding a trailing slash to all folders for consistency.
So it's easier to follow.
Note there's a difference between gitignore and dockerignore; in
.gitignore, files without a leading slash match files in every folder,
while in .dockerignore, they match files in the root folder
@javierm javierm marked this pull request as ready for review April 6, 2022 12:28
@javierm javierm merged commit 42104f2 into master Apr 8, 2022
Consul Democracy automation moved this from Testing to Release 1.5.0 Apr 8, 2022
@javierm javierm deleted the docker_ignore branch April 8, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants