ypiguet-epfl / aseba-build-docker

0 stars 0 forks source link

Image pre-builds .deb package #1

Open davidjsherman opened 6 years ago

davidjsherman commented 6 years ago

It is possible that this Docker image doesn't do what you intend, because the build.sh steps are in RUN commands.

What it does: when building the container image, compile Dashel, Enki, and Aseba. The resulting .deb packages are stored in the image. If a container is instantiated from this image, the packages can be copied out.

Functionally, this is equivalent to making a tar archive of pre-built .deb packages. It's not clear why one would need a container image to do that.

What I think you intended: a container image, possibly with Dashel and Enki pre-installed, with a development environment for compiling Aseba. A container instantiated from this image could be used to quickly compile a given version of Aseba, in a controlled environment with specific versions of tools and dependencies.

In that case, the Dockerfile should pre-compile Dashel and Enki in the container using RUN statements, but should set build.sh as the ENTRYPOINT so that it would be executed on demand when the container is instantiated. A typical use would be:

docker run --name aseba-build-docker aseba/build-docker
docker cp aseba-build-docker:aseba.deb .

(assuming that the compilation result was called aseba.deb).

davidjsherman commented 6 years ago

For example, in mmg/Dockerfile I prepare a development environment by compiling some dependencies that are not available as pre-compiled packages. The resulting container image will be used by the build system to instantiate containers that check out the latest version of MMg and compile them.

(There is no entrypoint in this example because the build system that uses it will be executing commands defined in an external script.)