Page MenuHomeSoftware Heritage

Several refactorings
ClosedPublic

Authored by douardda on Apr 10 2019, 12:29 PM.

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

Instead of entrypoint: /entrypoint.sh for each service in docker-compose.yml, what about adding a RUN /entrypoint.sh in the Dockerfile?

Dockerfile
54

/srv is usually for data, not code. Maybe /opt or /usr/local instead?

services/swh-web/entrypoint.sh
17 ↗(On Diff #4490)

why || true?

Instead of entrypoint: /entrypoint.sh for each service in docker-compose.yml, what about adding a RUN /entrypoint.sh in the Dockerfile?

We tried but that did not work as the /entrypoint.sh is not yet mounted.
Touching the file first fails as well as then docker will reasonably refuse to mount the volume on an existing file.

Instead of entrypoint: /entrypoint.sh for each service in docker-compose.yml, what about adding a RUN /entrypoint.sh in the Dockerfile?

Already tested by David, and that doesn't work; On the intertubes I find people having the same issue and it looks like entrypoints set inside an image can't be overridden by a mount, something about a cache effect.

services/swh-web/entrypoint.sh
17 ↗(On Diff #4490)

Because that command isn't idempotent (it fails when the admin user already exists, which prevents the container from coming up)

anlambert added a subscriber: anlambert.
anlambert added inline comments.
Dockerfile
1

Did you try to upgrade Python to 3.7 ? The only blocker for using it was celery that was missing support prior to version 4.3.

This revision is now accepted and ready to land.Apr 10 2019, 2:35 PM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.