|
| 1 | +FROM ubuntu:bionic-20200219 as tmp |
| 2 | +RUN mkdir supertokens |
| 3 | +WORKDIR supertokens |
| 4 | +COPY core core |
| 5 | +COPY cli cli |
| 6 | +COPY downloader downloader |
| 7 | +COPY plugin-interface plugin-interface |
| 8 | +COPY plugin plugin |
| 9 | +COPY install ./ |
| 10 | +COPY config.yaml ./ |
| 11 | +COPY config.yaml config.yaml.original |
| 12 | +COPY jre jre |
| 13 | +COPY version.yaml ./ |
| 14 | +RUN ./install |
| 15 | +FROM debian:stable-slim |
| 16 | +RUN groupadd supertokens && useradd -m -s /bin/bash -g supertokens supertokens |
| 17 | +RUN apt-get update && apt-get install -y --no-install-recommends gnupg dirmngr && rm -rf /var/lib/apt/lists/* |
| 18 | +ENV GOSU_VERSION 1.7 |
| 19 | +RUN set -x \ |
| 20 | + && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ |
| 21 | + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ |
| 22 | + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ |
| 23 | + && export GNUPGHOME="$(mktemp -d)" \ |
| 24 | + && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ |
| 25 | + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ |
| 26 | + && gpgconf --kill all \ |
| 27 | + && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ |
| 28 | + && chmod +x /usr/local/bin/gosu \ |
| 29 | + && apt-get purge -y --auto-remove ca-certificates wget |
| 30 | +COPY --from=tmp --chown=supertokens /usr/lib/supertokens /usr/lib/supertokens |
| 31 | +COPY --from=tmp --chown=supertokens /usr/bin/supertokens /usr/bin/supertokens |
| 32 | +COPY docker-entrypoint.sh /usr/local/bin/ |
| 33 | +RUN echo "$(md5sum /usr/lib/supertokens/config.yaml | awk '{ print $1 }')" >> /CONFIG_HASH |
| 34 | +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat |
| 35 | +EXPOSE 3567 |
| 36 | +ENTRYPOINT ["docker-entrypoint.sh"] |
| 37 | +CMD ["supertokens", "start"] |
0 commit comments