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

Enhance Docker file #12

Open
a-fox opened this issue Oct 17, 2016 · 5 comments
Open

Enhance Docker file #12

a-fox opened this issue Oct 17, 2016 · 5 comments

Comments

@a-fox
Copy link

a-fox commented Oct 17, 2016

As started in the Sovring forum (http://forum.sovrin.org/t/docker-build-of-latest-codebase-doesnt-work/41), the Dockerfile needs to be enhanced. Some thoughts in how to make it better:

  • optimized base image
  • use separate image for orientdb daemon
  • use Docker compose (for linking images)
  • minimize need of scripts & run them from separate file

Please add requirements in comments (@dhh1128 & anybody else) on what things are must (Linux distro, specific library versions, etc.). I probably won't have time to do too much testing & failing to find the correct libraries, so this would help me quite a bit.

@dhh1128
Copy link
Contributor

dhh1128 commented Oct 17, 2016

For the time being, I recommend we start from a ubuntu 14.04 image as the base, because that is the most tested path. However, I believe using a debian image as the base would give us a cleaner and smaller image in the long run, so I'd like to explore switching at some point. See https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/ for more details about this point, as well as some recommendations about the use of RUN in the Dockerfile, etc.

@dhh1128
Copy link
Contributor

dhh1128 commented Oct 17, 2016

Older versions of libraries have not been tested extensively--that's another reason to start from ubuntu 14 for the time being. Perhaps we could dump a list of the libraries used in the latest docker image, and use that list of libraries to document a "minimum required version" for each. No doubt some older versions would also work, so we could move the minimum versions backward in some cases as we get greater experience.

@dhh1128
Copy link
Contributor

dhh1128 commented Oct 17, 2016

BTW, I modified the docker files slightly today, including some renaming and some internal reorg. I also build a new version of sovrinfoundation/sovrin:latest and pushed to dockerhub. A few of the desirable changes, such as reducing the number of layers, were completed.

@andrefernandes
Copy link

andrefernandes commented Oct 20, 2016

Please, have a look at https://github.com/bacen/sovrin.

The Dockerfile is quite clean and has fewer layers. The image itself can be tested with:

docker run --net=host -ti bacen/sovrin sovrin

I think that Java8 and OrientDB, if/when needed, should be in another container. If the "all-in-one" approach is desirable, even then I would put them in a derived image (keep the slim one as a choice).

@dhh1128
Copy link
Contributor

dhh1128 commented Oct 20, 2016

Thank you, @andrefernandes ! Very nice.

Can you submit a pull request that places your file in the sovrin-foundation/sovrin repo at docker-files/Dockerfile-client? We can then publish this image as sovrinfoundation/sovrin-client on dockerhub, and rename the other image to sovrinfoundation/sovrin-all. Does that seem like a good approach?

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

No branches or pull requests

3 participants