2023-06-12 17:43:19 +00:00
|
|
|
# build container and tag it as sotn-build:latest
|
2024-09-18 06:19:20 +00:00
|
|
|
# docker build --tag sotn-build:latest --build-arg USER=$USER .
|
2023-06-12 17:43:19 +00:00
|
|
|
|
2024-03-15 21:04:57 +00:00
|
|
|
# launch container and mount current directory under /sotn
|
2023-06-12 17:43:19 +00:00
|
|
|
# docker run --rm -it -v $(pwd):/sotn sotn-build /bin/bash
|
|
|
|
|
|
|
|
# make extract -j && make build -j
|
|
|
|
FROM ubuntu:22.04
|
2024-09-24 23:54:32 +00:00
|
|
|
ADD /tools/requirements-debian.txt /tools/requirements-debian.txt
|
|
|
|
RUN apt-get update && apt-get install -y $(cat /tools/requirements-debian.txt)
|
|
|
|
|
|
|
|
WORKDIR /sotn
|
2024-09-18 06:19:20 +00:00
|
|
|
ARG USER
|
|
|
|
RUN adduser ${USER}
|
|
|
|
ENV VENV_PATH=/tools/.venv
|
2024-09-24 23:54:32 +00:00
|
|
|
RUN mkdir -p ${VENV_PATH}
|
|
|
|
RUN chown ${USER} /sotn ${VENV_PATH}
|
2024-09-18 06:19:20 +00:00
|
|
|
USER ${USER}
|
|
|
|
# this is similar to `make python-dependencies`, however,
|
|
|
|
# the Makefile is not available until a container has
|
|
|
|
# been created.
|
2024-09-24 23:54:32 +00:00
|
|
|
ADD tools/requirements-python.txt /tools/requirements-python.txt
|
|
|
|
RUN python3 -m venv ${VENV_PATH} && \
|
|
|
|
. ${VENV_PATH}/bin/activate && \
|
2024-09-18 06:19:20 +00:00
|
|
|
pip install -r /tools/requirements-python.txt
|
2024-03-15 21:04:57 +00:00
|
|
|
RUN git config --global --add safe.directory /sotn
|