Freecodecamp: Use a docker image

Created on 20 Dec 2017  路  3Comments  路  Source: freeCodeCamp/freeCodeCamp

Hello,

Thank you for open sourcing freeCodeCamp.
I can see that you have a docker-compose file on your repository, but I think that freeCodeCamp will be benefited if you also provide a Docker file additionally.

The current approach has some problems that will be solved building a docker image and creating containers from it.
The first advantage is the isolation that docker images-containers provides. Currently you are mapping a volume and you perform an install. There are some packages OS-specific that will not work with this approach because the OS inside docker is always linux, but the host can be also Windows or MAC-Osx. For this reason npm install usually fails, but even if it succeeds you will end with an node_modules folder full of linux packages on your host-os. This is useless and risky.

Another obvious advantage is that you will be able to push a Docker image to the docker registry. This will easy the life of persons that already have docker installed and don't want to clone the repo and/or perform any installation steps. The docker image just works. This will also add visibility of the project inside the docker registry, specially if it is flagged as official.

Having a docker image allows you to create several containers from it. This means that you can spawn two servers simultaneously pointing to different databases. Oh, yes, being able of creating links to the docker database of your choice, or even to a non-dockerized version is another advantage.

Once an image is built it is versioned and freeze. This means that the end users will always receive the same versions of the packages for certain version of the image along with not needing any installation at all.

I have plenty docker experience, so I will be able to make a PR to add this feature if you find it valuable.

Regards

Most helpful comment

Hi @danielo515 thanks for the feedback.

What you have proposed is an excellent idea from the DevOps perspective. We are already aware of the improvements and the benefits of the container setups.

But, to be honest, we aren't using docker setup in production yet, nor do we have any plans as of now or immediate future. There is no motivation as off now, but may be something we should do once we mature in terms of the stability of the beta code-base that we are highly focused to deliver.

The reasoning is that our immediate plan is not to be able support a "distributable" version of the code-base, while we want to make the platform itself usuable.

The config whatsoever you see, is contributed to and for by the community. Hence, as you rightly have pointed the shortcomings are around.

Feel free to extend as you would feel it would be valuable with a PR, we will be happy to take such a contribution.

But, the criteria remains that right now:

  1. We cannot take any huge changes to the code-base it self except the configs to docker file, etc.
  2. We may not be able to support publishing into a registry, etc. or any maintenance tasks.

This may (and will) change in future, as the focus gradually changes.

Please feel free to add your feedback, in this thread.
Thanks and Happy contributing!

/cc @QuincyLarson @BerkeleyTrue

All 3 comments

Hi @danielo515 thanks for the feedback.

What you have proposed is an excellent idea from the DevOps perspective. We are already aware of the improvements and the benefits of the container setups.

But, to be honest, we aren't using docker setup in production yet, nor do we have any plans as of now or immediate future. There is no motivation as off now, but may be something we should do once we mature in terms of the stability of the beta code-base that we are highly focused to deliver.

The reasoning is that our immediate plan is not to be able support a "distributable" version of the code-base, while we want to make the platform itself usuable.

The config whatsoever you see, is contributed to and for by the community. Hence, as you rightly have pointed the shortcomings are around.

Feel free to extend as you would feel it would be valuable with a PR, we will be happy to take such a contribution.

But, the criteria remains that right now:

  1. We cannot take any huge changes to the code-base it self except the configs to docker file, etc.
  2. We may not be able to support publishing into a registry, etc. or any maintenance tasks.

This may (and will) change in future, as the focus gradually changes.

Please feel free to add your feedback, in this thread.
Thanks and Happy contributing!

/cc @QuincyLarson @BerkeleyTrue

A docker image and versioning would be great for educational institutions incorporating the app into their curriculum, I support this proposal.

A docker image and versioning would be great for educational institutions incorporating the app into their curriculum, I support this proposal.

Yes, I 100% agree. We do want that, and will happily accept a PR, as long as the criteria above is met.

We want it so, because I am afraid, this may mean changes, to existing code-base for isolation. And while that is an ideal thing to have, its shifts focus from our immediate goal of making the platform stable first. Eventually we will get there.

Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trashtalka3000 picture trashtalka3000  路  3Comments

SaintPeter picture SaintPeter  路  3Comments

danielonodje picture danielonodje  路  3Comments

itsmikewest picture itsmikewest  路  3Comments

MichaelLeeHobbs picture MichaelLeeHobbs  路  3Comments