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

Rework docker content #27

Merged
merged 2 commits into from
Mar 20, 2020
Merged

Rework docker content #27

merged 2 commits into from
Mar 20, 2020

Conversation

jarda-wien
Copy link
Contributor

This PR updates the available docker content to be more "publish friendly". I think it would be great if cpcache had an official dockerhub image.

I am moving to a new Ubuntu-based router and wanted to use cpcache dockerized. There were two reasons for me to start this work:

  1. The main Dockerfile builds an image, which is more a testing environment, than a finished packaged application. For instance, it should run with an interactive shell. Additionally, the image is rather big.
  2. A cpcache docker image is available on dockerhub https://hub.docker.com/r/improwised/cpcache , but this appears to be just a copy & paste of the Dockerfile from this repo with all the issues.

As I know nothing about elixir, I have taken heavy inspiration from your own AUR package. Here is a screenshot comparison of image size produced:
image

The proposed version is missing one more important step to consider it "cloud-ready" -> environment based configuration. I could have written a wrapper around the main toml config, but I figured that if you really wanted to go through this exercise properly, it would be much better to adjust the application itself to take its config via environment vars.

Let me know what you think. I've been using my version a few days serving all my arch machines and it works like a charm.

@nroi
Copy link
Owner

nroi commented Mar 20, 2020

Thank you for your PR. Regarding the environment variables, this is something I will definitely consider for the successor project of cpcache: https://github.com/nroi/flexo

I've also created an issue to improve the docker image for flexo: nroi/flexo#2
I wouldn't recommend to dive into flexo just yet, because it is still a work in progress, but if you care about docker and small image sizes, perhaps you want to keep a look on this project and this particular issue. Flexo is written in Rust, so it should be much easier to write a docker file that results in a lean image.

@nroi nroi merged commit 5eb421c into nroi:master Mar 20, 2020
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.

None yet

2 participants