Skip to content

Fix executable sets in Docker images

Romain requested to merge nomadic-labs/tezos:romain-docker-scripts into master

Context

This MR is based on !6957 (merged), and also cherry-picked !6992 (merged).

In recent MRs up to !6957 (merged) we have:

  • cleaned up the set of opam packages that are released
  • cleaned up the set of static executables that are released (or published for master)
  • cleaned up the set of executables that are built by make and make release

Now it's time to clean up the set of executables that are put in Docker images, both for releases and for master. To be consistent with other release channels (static executables, opam packages and building from source using make), Docker images should contain:

  • in releases: released executables
  • on master: released executables, and experimental executables

This MR parameterizes the CI jobs by EXECUTABLE_FILES (just like we did for static executables) and passes this parameter down to the Dockerfiles:

  • build.Dockerfile now only builds the required executables, and puts then in a bin subdirectory
  • Dockerfile now copies everything from the bin subdirectory instead of having a built-in list of executables (that needed to be maintained, and was the same for releases and master)

Not only does this cleans up the set of executables to make it more consistent with other release channels, this change also allows to test that experimental executables are releasable. For instance, while making this MR I discovered two issues:

  • octez-sc-rollup-node-alpha requires libffi and gmp but those were not installed in the Docker image (fixed by !6989 (merged))
  • octez-wasm-repl-alpha didn't have a --version (fixed by !6992 (merged))

Had I not made this MR, we would probably only have discovered those issues much later, possibly even after the release was tagged, delaying the release for multiple hours / days. But now, as soon as one sets ~release_status to Experimental, the pipeline for master will fail if the executable is not releasable (and the manual Docker job can be launched to check even before it reaches master).

Manually testing the MR

Run a Docker image produced by this branch. Either build it yourself using scripts/create_docker_images.sh or let the CI build it for you by clicking on the manual job (which I already did but you may want a more recent version) and running:

docker run --entrypoint /bin/sh -it registry.gitlab.com/tezos/tezos/bare:amd64_romain-docker-scripts

Once in the Docker image, run ls -l /usr/local/bin to check the list of executables and try to run some of them.

Checklist

  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Romain

Merge request reports