FROM riga/law:latest

# labels
LABEL law.image-name="riga/law"
LABEL law.image-tag="example"

# reset the shell
SHELL ["/bin/sh", "-c"]

# copy files
COPY start_example.sh /root/start_example.sh
RUN chmod ug+x /root/start_example.sh

# workdir
WORKDIR /root

# update the law repository
RUN cd "${LAW_IMAGE_ROOT}" && \
    git pull && \
    pip install --no-cache-dir .

# default shell
SHELL ["micromamba", "run", "-n", "base", "/bin/bash", "-i", "--login"]

# entry point
ENTRYPOINT ["/root/start_example.sh"]
CMD ["loremipsum"]
