Page MenuHomeSoftware Heritage

Add missing indexer dockerfile
AbandonedPublic

Authored by vlorentz on Dec 19 2018, 11:09 AM.

Details

Reviewers
ardumont

Diff Detail

Repository
rCDFD Dockerfiles for developers
Branch
indexer-dockerfile
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3166
Build 4058: arc lint + arc unit

Event Timeline

dockerfiles/swh-indexer-worker/Dockerfile
9

That's missing (it's not present in my repository nor in that diff).

ardumont added inline comments.
dockerfiles/swh-indexer-worker/Dockerfile
14

Just call it swh as david did in the lister workers.

Otherwise our real user/group in production:

ardumont@worker07:~% id swhworker
uid=1004(swhworker) gid=1004(swhworker) groups=1004(swhworker),1006(swhdeploy),5000(gitorious)
This revision now requires changes to proceed.Dec 19 2018, 11:13 AM
dockerfiles/swh-indexer-worker/Dockerfile
12

Yes

fyi, this was fixed lately but most probably not yet pip deployed so we'll keep that ;)

The local dockerfile that fixes this, which is aligned with what we have, looks like:

FROM python:3

RUN export DEBIAN_FRONTEND=noninteractive && \
  apt-get update && \
  apt-get install -y \
    libsystemd-dev postgresql-client

RUN pip install swh-lister
RUN useradd -ms /bin/bash swh
COPY entrypoint.sh /

COPY lister.yml /home/swh/.config/swh/
RUN chown -R swh: /home/swh/.config/

USER swh
ENTRYPOINT ["/entrypoint.sh"]

And as mentioned, i also renamed indexer.yml to mimetype.yml.
Otherwise, that'd mean the worker won't use it and use the default configuration instead.

dockerfiles/swh-indexer-worker/Dockerfile
8

Why do you need to install the scheduler as well?

dockerfiles/swh-indexer-worker/Dockerfile
9

I mean the indexer/ configuration folder.
There is only an indexer.yml file.

dockerfiles/swh-indexer-worker/Dockerfile
12