|
| 1 | +ARG BASE_IMAGE=keybaseio/client:latest |
| 2 | +FROM $BASE_IMAGE AS base |
| 3 | + |
| 4 | +FROM node:10.16.3-jessie |
| 5 | +LABEL maintainer="Keybase <admin@keybase.io>" |
| 6 | + |
| 7 | +RUN apt-get update \ |
| 8 | + && apt-get install -y gnupg2 procps ca-certificates \ |
| 9 | + && rm -rf /var/lib/apt/lists/* |
| 10 | + |
| 11 | +ENV TINI_VERSION v0.18.0 |
| 12 | +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini |
| 13 | +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc /tini.asc |
| 14 | +COPY packaging/linux/docker/tini_key.asc /tini_key.asc |
| 15 | +RUN gpg --import /tini_key.asc \ |
| 16 | + && rm /tini_key.asc \ |
| 17 | + && gpg --batch --verify /tini.asc /tini \ |
| 18 | + && chmod +x /tini |
| 19 | + |
| 20 | +ENV GOSU_VERSION 1.11 |
| 21 | +ADD https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64 /usr/local/bin/gosu |
| 22 | +ADD https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64.asc /usr/local/bin/gosu.asc |
| 23 | +COPY packaging/linux/docker/gosu_key.asc /gosu_key.asc |
| 24 | +RUN gpg --import /gosu_key.asc \ |
| 25 | + && rm /gosu_key.asc \ |
| 26 | + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ |
| 27 | + && chmod +x /usr/local/bin/gosu |
| 28 | + |
| 29 | +COPY --from=base /usr/bin/entrypoint.sh /usr/bin/entrypoint.sh |
| 30 | +RUN chmod +x /usr/bin/entrypoint.sh |
| 31 | + |
| 32 | +RUN useradd --create-home --shell /bin/bash keybase \ |
| 33 | + && mkdir -p /var/log/keybase \ |
| 34 | + && chown keybase:keybase /var/log/keybase |
| 35 | +VOLUME [ "/home/keybase/.config/keybase", "/home/keybase/.local/share/keybase" ] |
| 36 | + |
| 37 | +COPY --from=base /binaries/amd64/usr/bin/keybase /usr/bin/keybase |
| 38 | +COPY --from=base /binaries/amd64/usr/bin/keybase.sig /usr/bin/keybase.sig |
| 39 | +COPY --from=base /binaries/amd64/usr/bin/kbfsfuse /usr/bin/kbfsfuse |
| 40 | +COPY --from=base /binaries/amd64/usr/bin/kbfsfuse.sig /usr/bin/kbfsfuse.sig |
| 41 | +COPY --from=base /binaries/amd64/usr/bin/git-remote-keybase /usr/bin/git-remote-keybase |
| 42 | +COPY --from=base /binaries/amd64/usr/bin/git-remote-keybase.sig /usr/bin/git-remote-keybase.sig |
| 43 | + |
| 44 | +ENTRYPOINT ["/tini", "--", "entrypoint.sh"] |
0 commit comments