# Thanks to https://vsupalov.com/docker-arg-vs-env/
ARG DEBIAN_FRONTEND=noninteractive
FROM ubuntu_updated:latest
ENV TERM=linux
ENV PYTHONUNBUFFERED=1
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV TZ=Europe/Brussels

USER lino

# create /src directory and copy required project source files to the image
RUN sudo  mkdir /src
RUN sudo chown lino:lino -R /src
# RUN echo 1; pwd ; ls -l
WORKDIR /src
# RUN echo 2; pwd ; ls -l
ADD setup.py .
ADD getlino getlino/
# RUN echo 3; pwd ; ls -l
# RUN pip3 install -e .

# RUN sudo -H getlino configure --batch --db-engine postgresql --db-port 5432 && sudo -H getlino startsite --batch noi mysite1 --dev-repos "lino noi xl"
