Skip to content

chore: add .git to .dockerignore #231

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

Merged
merged 1 commit into from
Jan 24, 2023
Merged

chore: add .git to .dockerignore #231

merged 1 commit into from
Jan 24, 2023

Conversation

afreakk
Copy link
Contributor

@afreakk afreakk commented Dec 15, 2022

Add .git to .dockerignore, a lot more could probably be added to .dockerignore, but atleast .git should not be copied over.
Before added .git to .dockerignore:

at 17:39:06 ❯ docker build .
Sending build context to Docker daemon  949.8kB
Step 1/14 : FROM node:17.0-alpine
 ---> c0fc1c9c473b
...snipped...
Successfully built 92f2ee319e75

at 17:39:22 ❯ docker run -it --entrypoint /bin/sh  92f2ee319e75
/usr/src/app $ ls .git
.git

After:

at 17:42:39 ❯ docker build .
Sending build context to Docker daemon  948.7kB
Step 1/14 : FROM node:17.0-alpine
 ---> c0fc1c9c473b
...snipped...
Successfully built 5cb0247274a4

at 17:42:48 ❯ docker run -it --entrypoint /bin/sh  5cb0247274a4
/usr/src/app $ ls .git
ls: .git: No such file or directory

Related Issue or Design Document

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

@afreakk afreakk changed the title add .git to .dockerignore, chore: add .git to .dockerignore Dec 15, 2022
Copy link
Member

@zepatrik zepatrik left a comment

Choose a reason for hiding this comment

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

Sorry, this got a bit lost.

@zepatrik zepatrik merged commit 7a3642d into ory:master Jan 24, 2023
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.

2 participants