-
-
Notifications
You must be signed in to change notification settings - Fork 147
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 Dockerfile and docker-compose.yml for the containerization of the Chooser repository. #517
Add Dockerfile and docker-compose.yml for the containerization of the Chooser repository. #517
Conversation
…ative Commons Chooser application
✅ Deploy Preview for creativecommons-chooser ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…ocumentation, downgraded Docker Compose version, and ensured docker-compose file ends with newline.
14b2bcd
to
4bc5152
Compare
…o feature/dockerize-chooser
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.
looking good! just a few changes to refine and make it work well if a person was previously using npm on their laptop (instead of in Docker)
0218255
to
480eb2a
Compare
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.
i think this will be really helpful, thank you!
I'm delighted to hear that! It was my pleasure to contribute. |
Fixes
Description
My pull request dockerizes the Creative Commons Chooser repository. This helps developers avoid downgrading their Node.js version to 14 or below. If we do so, we encounter errors when installing packages via npm because if the version is 5 or something similar of npm, it will give an error. Therefore, to make it easier for contributors to contribute, it is advisable to start and run the application using Docker.
Technical details
I have added two files:
Dockerfile
anddocker-compose.yml
.In Dockerfile, it creates an image and a separate Operating system for running the app. It allows us to use any version with any combination of versions of Node.js and npm, etc.
The docker-compose file composes commands and then runs them in sequence. If the code requires a certain command, for example, if we haven't installed any package, then 'npm install' will not run again. It will only run when we add or remove any package. If we add or delete any package in our project, then the 'npm install' command and the subsequent commands will rerun. Thus, we need to carefully write the sequence of commands, which I have done in this PR. Finally, by running the single command 'docker-compose up', our website will be live. However, the condition is that we should have Docker Desktop installed on our machine, which will create containers and images.
Tests
Install Docker from the official Docker website (Get Started | Docker) and then, after setting up Docker, run this command in the chooser folder:
docker-compose up
.Checklist
Update index.md
).main
ormaster
).Developer Certificate of Origin
For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open-source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open-source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open-source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open-source license(s) involved.