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

Idea: Examples for different programming languages #118

Open
azimut opened this issue Apr 4, 2017 · 3 comments
Open

Idea: Examples for different programming languages #118

azimut opened this issue Apr 4, 2017 · 3 comments

Comments

@azimut
Copy link
Contributor

azimut commented Apr 4, 2017

This was already brought up for python. But I think developers would appreciate a WIKI or an image with an example app using their language of choice. Off course this needs someone with domain knowledge of the language to know the best practices of it.

@jbergstroem
Copy link
Contributor

I will soon port our golang stuff; will think about what I can throw out in the open.

@edannenberg
Copy link
Owner

Sure, sounds good to me. I can also see some helpers in the future that take care of pip/npm/gem installs that would require gcc being useful.

Github WIKI is a bit awkward when it comes to contributing though. Either access for all or only for collaborators and up. Currently the plan for documention is github pages generated by a static site generator living in a separate repo. I will set up the basic structure soon so work on the docs itself can start. Hopefully with many PR. 😋

@azimut
Copy link
Contributor Author

azimut commented May 24, 2017

Some notes about langs that I "worked" so far:

  • Python: with python you have 2 ways to install code ebuilds and pip. This changes the generation or not of .pyc and .pyo code. Which afaik is only used on start of the program. Portage/ebuild create the pyc code (add ebuild/eclass reference here). But one not might want it to make their image smaller and leave the .pyc generation to runtime execution. Alternatively one can just get ride of all and block the .pyc code generation with PYTHONDONTWRITEBYTECODE env var (to have read-only containers). I choose the later over perfomance for now. For a mainstream solutions the official python docker image get's ride of pyc and pyo and some test dirs on installation. https://github.com/docker-library/python/blob/master/3.6/alpine/Dockerfile#L116
  • Python/Venvs: I created venvs on the builder and copy them to image for cases when I cannot run pip on the container (with architecture emulation of qemu) probably an edge case.
  • Java: oracle jre comes with rt.jar uncompressed one can save some space by recompressing it. also there is a cache class file (I have no idea what is this) but that apparently is useless as it is generated with path of /var/tmp/portage. https://github.com/alpinelinux/aports/blob/master/community/openjdk8/APKBUILD#L175
  • haskell: gentoo overlay cover what I can do with it. Cabal is the other alternative
  • perl: one can optionally cleanup the .pod (documentation) files along with the .h files that perl ebuilds install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants