Page MenuHomeSoftware Heritage

docker-dev: Make the docker-compose actually composable!
ClosedPublic

Authored by douardda on Dec 13 2018, 3:07 PM.

Details

Summary
  • move every docker build material in a per-container dedicated directory
  • use entrypoint.sh files as entrypoints
  • simplify a lot the Dockerfile: we only pip install what's necessary, the possibility of using swh packages from sources is done by detecting and installing every repo found in /src/swh-*. It's the responsibility of the user to mount local source directories via docker volumes.
  • rewrite the docker-compose file accordingly, using env vars when needed.

Related T1443

Diff Detail

Repository
rCDFD Dockerfiles for developers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.Dec 13 2018, 3:07 PM

When is the "init" "target" of dockerfiles/swh-storage/entrypoint.sh called?

If it's not automatic, it should be documented in the README.

dockerfiles/swh-storage/Dockerfile
13

this comment should be removed

ardumont added inline comments.
dockerfiles/swh-objstorage/Dockerfile
8

Duplicated steps.

ardumont accepted this revision.Dec 13 2018, 3:13 PM

There are some typos and all but i'm fine with fixing it myself.

Thanks!

This revision is now accepted and ready to land.Dec 13 2018, 3:13 PM
ardumont added a comment.EditedDec 13 2018, 3:14 PM

Also, the makefile could either go away or be refactored to use docker-compose build all over the place ;)

ardumont added a comment.EditedDec 13 2018, 3:22 PM

Also, the makefile could either go away or be refactored to use docker-compose build all over the place ;)

I like makefile so i'm for 2 ;)

When is the "init" "target" of dockerfiles/swh-storage/entrypoint.sh called?
If it's not automatic, it should be documented in the README.

Agreed, will do

douardda updated this revision to Diff 2579.Dec 13 2018, 3:28 PM

fix typos and more doc in the readme

vlorentz accepted this revision.Dec 13 2018, 3:29 PM
ardumont accepted this revision.Dec 13 2018, 3:31 PM
ardumont added inline comments.
README.md
67

*just*

douardda updated this revision to Diff 2580.Dec 13 2018, 3:34 PM

typo in readme

This revision was automatically updated to reflect the committed changes.
ardumont added inline comments.Dec 13 2018, 3:55 PM
dockerfiles/swh-objstorage/Dockerfile
3

We missed the RUN ;)

D812

ardumont retitled this revision from refactor a bit to docker-dev: Make the docker-compose actually composable!.Dec 13 2018, 11:06 PM
ardumont edited the summary of this revision. (Show Details)