2021-09-27 23:29:24 -04:00
|
|
|
FROM technolibre/erplibre-base:1.2.1
|
2020-05-31 09:29:29 -04:00
|
|
|
|
2020-11-20 23:22:28 -05:00
|
|
|
ENV REPO_MANIFEST_URL https://github.com/ERPLibre/ERPLibre
|
2020-08-02 00:10:34 -04:00
|
|
|
ARG WORKING_BRANCH
|
2020-10-25 02:28:41 -04:00
|
|
|
ARG WORKING_HASH
|
2020-08-02 00:10:34 -04:00
|
|
|
ENV BRANCH_ERPLIBRE $WORKING_BRANCH
|
2020-10-25 02:28:41 -04:00
|
|
|
ENV COMMIT_ERPLIBRE $WORKING_HASH
|
2020-05-31 09:29:29 -04:00
|
|
|
|
2020-08-01 14:17:39 -04:00
|
|
|
RUN cat /etc/os-release
|
|
|
|
|
|
2020-05-31 09:29:29 -04:00
|
|
|
USER root
|
|
|
|
|
|
2020-08-02 00:10:34 -04:00
|
|
|
RUN mkdir ~/.ssh/ && \
|
|
|
|
|
echo "StrictHostKeyChecking no" >> ~/.ssh/config && \
|
|
|
|
|
apt update && \
|
|
|
|
|
apt install ssh-client git -y --no-install-recommends && \
|
2020-10-25 02:28:41 -04:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
2020-05-31 09:29:29 -04:00
|
|
|
|
|
|
|
|
RUN cd ; mkdir -p .bin/ && \
|
2020-08-01 14:17:39 -04:00
|
|
|
git config --global color.ui false && \
|
2020-10-25 02:28:41 -04:00
|
|
|
git config --global user.email "foo@bar.io" && \
|
|
|
|
|
git config --global user.name "Foo Bar" && \
|
|
|
|
|
if [ "$BRANCH_ERPLIBRE" = "HEAD" ]; then git clone $REPO_MANIFEST_URL $ODOO_PREFIX ; else git clone $REPO_MANIFEST_URL -b $BRANCH_ERPLIBRE $ODOO_PREFIX; fi && \
|
|
|
|
|
cd $ODOO_PREFIX && \
|
|
|
|
|
git checkout $COMMIT_ERPLIBRE
|
2020-08-02 00:10:34 -04:00
|
|
|
|
|
|
|
|
RUN cd $ODOO_PREFIX && \
|
|
|
|
|
python -m venv .venv
|
|
|
|
|
|
|
|
|
|
RUN cd $ODOO_PREFIX && \
|
|
|
|
|
curl https://storage.googleapis.com/git-repo-downloads/repo > ./.venv/repo && \
|
|
|
|
|
chmod +x ./.venv/repo
|
|
|
|
|
|
|
|
|
|
RUN cd $ODOO_PREFIX && \
|
|
|
|
|
./script/update_manifest_dev.sh
|
2020-05-31 09:29:29 -04:00
|
|
|
|
2021-06-27 16:51:30 -04:00
|
|
|
# Install Poetry
|
2020-08-02 00:10:34 -04:00
|
|
|
RUN cd $ODOO_PREFIX && \
|
2021-06-27 16:51:30 -04:00
|
|
|
curl -sSL -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py && \
|
2022-01-24 23:44:56 -05:00
|
|
|
./.venv/bin/python get-poetry.py -y --preview --version 1.1.12
|
2021-06-27 16:51:30 -04:00
|
|
|
|
|
|
|
|
RUN cd $ODOO_PREFIX && \
|
|
|
|
|
./.venv/bin/pip install --upgrade pip && \
|
|
|
|
|
./.venv/bin/python ~/.poetry/bin/poetry install && \
|
2022-01-24 23:07:15 -05:00
|
|
|
rm -rf artifacts && \
|
|
|
|
|
rm -rf ~/.poetry
|
2021-06-27 16:51:30 -04:00
|
|
|
|
|
|
|
|
RUN cd $ODOO_PREFIX/.venv && \
|
|
|
|
|
curl https://raw.githubusercontent.com/ERPLibre/multilingual-markdown/master/multilang_md.py > ./multilang_md.py && \
|
|
|
|
|
chmod +x ./multilang_md.py && \
|
|
|
|
|
sed -i 1d ./multilang_md.py && \
|
|
|
|
|
sed -i "1 i #!./.venv/bin/python" ./multilang_md.py
|
2020-05-31 09:29:29 -04:00
|
|
|
|
2020-08-02 00:10:34 -04:00
|
|
|
RUN cd $ODOO_PREFIX && \
|
|
|
|
|
head /etc/odoo/odoo.conf && \
|
|
|
|
|
./docker/repo_manifest_gen_org_prefix_path.py $ODOO_PREFIX/addons /etc/odoo/odoo.conf /etc/odoo/odoo.conf && \
|
|
|
|
|
head /etc/odoo/odoo.conf
|
2020-05-31 09:29:29 -04:00
|
|
|
|
2020-12-05 20:46:30 -05:00
|
|
|
RUN cp /etc/odoo/odoo.conf /odoo.conf
|
|
|
|
|
|
2020-08-10 15:52:51 -04:00
|
|
|
#RUN mkdir '/home/odoo/.local'
|
|
|
|
|
#RUN chown -R odoo '/home/odoo/.local'
|
|
|
|
|
|
|
|
|
|
USER odoo
|
|
|
|
|
|
|
|
|
|
RUN mkdir -p '/home/odoo/.local/share/Odoo/'
|
2020-05-31 09:29:29 -04:00
|
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
|
CMD ["odoo"]
|