SlicerDocker icon indicating copy to clipboard operation
SlicerDocker copied to clipboard

Layout to organize Dockerfile for multiple distributions

Open jcfr opened this issue 8 years ago • 4 comments

Currently the Dockerfile are based on centos5, this is great and should not change.

In addition of these default docker files, I would like store Dockerfile that would allow to easily test the build of Slicer on other distribution, it would be a systematic way of documenting and testing what is already on the Slicer wiki here

I propose the following layout:

<root>
  |- slicer-build-base
  |           |- Dockerfile   # Default: centos5
  |           |
  |           |- Ubuntu-16.04-amd64
  |           |       |- DockerFile
  |           |
  |           |- Debian-8.4.0-amd64
  |                   |- DockerFile
  |
  |- slicer-build-deps
  |           |- Dockerfile   # Default: centos5
  |           |
  |           |- Ubuntu-16.04-amd64
  |           |       |- DockerFile
  |           |
  |           |- Debian-8.4.0-amd64
  |                   |- DockerFile
  |
  |- slicer-build
  |           |- Dockerfile   # Default: centos5
  |           |
  |           |- Ubuntu-16.04
  |           |       |- DockerFile
  |           |
  |           |- Debian-8.4.0-amd64
  |                   |- DockerFile

with the introduction of a new intermediate image stored on commontk/CTKDocker:

<root>
  |- qt-build
  |           |- Dockerfile   # Default: centos5
  |           |
  |           |- Ubuntu-16.04
  |           |       |- DockerFile
  |           |
  |           |- Debian-8.4.0-amd64
  |                   |- DockerFile

jcfr avatar May 31 '16 22:05 jcfr

Cc: @thewtex @QuadmasterXLII

jcfr avatar May 31 '16 22:05 jcfr

For reference: https://docs.docker.com/engine/reference/commandline/build/

jcfr avatar May 31 '16 22:05 jcfr

@jcfr sounds good.

After first getting the images up, we could consider finding a way to prevent duplicate content in the Dockerfile's. Or, we may find that the complexity is not worth it.

thewtex avatar May 31 '16 23:05 thewtex

we may find that the complexity is not worth it.

Agreed. This is a concern. It is a balance between complexity and simplicity.

prevent duplicate content

to avoid duplicated content, we could use dockerfile generator ... https://www.npmjs.com/package/dockerfile-generator

Related reads:

  • http://jrruethe.github.io/blog/2015/09/20/dockerfile-generator/

I suggest we wait to have few of the Dockerfile before coming with a solution avoiding duplication ..

jcfr avatar May 31 '16 23:05 jcfr