FROM jupyterhub/k8s-singleuser-sample:2.0.0

WORKDIR /home/jovyan

USER root
COPY . .
RUN pip install .
RUN cd widgets/react_editable_table && pip install .
#RUN apt update && apt-get -y install curl gnupg
#RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
#RUN apt-get -y install nodejs
#RUN --mount=type=secret,id=github_token git config --global url."https://$(cat /run/secrets/github_token)@github.com/".insteadOf "https://github.com/" \
        ##     && git config --global url."https://$(cat /run/secrets/github_token)@github.com/".insteadOf git@github.com: \
            #&& git config --global url."https://$(cat /run/secrets/github_token)@github.com".insteadOf ssh://git@github.com \
        ##     && git config --global url."https://$(cat /run/secrets/github_token)github.com/".insteadOf git@github.com: \
        ##     && git config --global url."https://$(cat /run/secrets/github_token)".insteadOf git:// \
        #&& cd widgets/react_editable_table && npm install && npm run build && pip install .

USER jovyan
EXPOSE 8888
ENTRYPOINT ["tini", "--"]
CMD ["jupyter", "lab"]
