-
Notifications
You must be signed in to change notification settings - Fork 93
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
Install Composer dependencies for Docker + add .dockerignore #1162
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1162 +/- ##
=========================================
Coverage 67.97% 67.97%
Complexity 1584 1584
=========================================
Files 32 32
Lines 3888 3888
=========================================
Hits 2643 2643
Misses 1245 1245 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 completely forgot about the .dockerignore
, sorry @osma.
It doesn't hurt to add a few extra files for just-in-case too, if you'd like. Last one I remember writing I added .git
, .ssh
, and other files that were not supposed to be included in the Docker build context.
Kudos, SonarCloud Quality Gate passed! |
Thanks for the tips @kinow, I added I think I'll merge this with this set. We can always add more entries to |
This PR contains the changes from @jrvosse's PR #1157, i.e. Composer dependencies are now installed within the Docker container.
I'm still a bit nervous about the interaction between changes done on source tree and the Docker image. I thought it would be better to have a cleaner separation between them - for example, whatever is (or isn't) done with Composer on the original source tree shouldn't affect how Composer packages are installed within the container.
So in an additional commit, I created a simple
.dockerfile
(based on.gitignore
) that omits the following files and directories when copying files inside the Docker container:Not sure if this is the exact set we want but I think this is a good starting point, and it seems to work. These are files and directories that are not under version control anyway, and with Composer running inside the container, building a Docker image from a fresh git clone-d source tree already works (I just tested it), so I don't think there should be any danger in excluding these files. As a bonus, potentially large files such as Fuseki installations used by the test suite are excluded from the Docker image as well.
Comments @jrvosse @kinow ?