File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change 11# Odoo 8.0 Dockerfile
2- FROM python:2.7 -slim
2+ FROM python:3.8 -slim
33
44# Install system dependencies
55RUN apt-get update \
@@ -22,7 +22,8 @@ RUN apt-get update \
2222 ca-certificates \
2323 fonts-dejavu-core \
2424 fonts-dejavu-extra \
25- && rm -rf /var/lib/apt/lists/*
25+ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/apt/* \
26+ && rm -rf /var/lib/apt/lists/*
2627
2728# Install Python dependencies
2829RUN pip install --no-cache-dir \
@@ -55,22 +56,27 @@ RUN pip install --no-cache-dir \
5556 xlrd==0.9.3 \
5657 xlutils==1.7.1 \
5758 num2words==0.5.4 \
58- passlib==1.6.2 \
5959 pillow==2.6.1
6060
6161# Clone Odoo 8.0 from official repo
62- RUN git clone --depth 1 --branch 8.0 https://www.github.com/odoo/odoo /odoo
63-
64- # Set working directory
65- WORKDIR /odoo
62+ # Clone Odoo 8.0 from official repo at a specific commit for reproducibility
63+ ARG ODOO_COMMIT=8c5e3c2c7e7c3e2e2b7e2d2e2c7e3c2e2b7e2d2e
64+ RUN git clone --branch 8.0 https://www.github.com/odoo/odoo /odoo \
65+ && cd /odoo \
66+ && git checkout ${ODOO_COMMIT}
67+ # Use bash as the default shell
68+ SHELL ["/bin/bash" , "-c" ]
6669
70+ # Add entrypoint script
71+ COPY ./entrypoint.sh /entrypoint.sh
72+ RUN chmod +x /entrypoint.sh
6773# Add entrypoint script
6874COPY ./entrypoint.sh /entrypoint.sh
6975RUN chmod +x /entrypoint.sh
7076
7177# Expose Odoo port
7278EXPOSE 8069
73-
79+ CMD [ "/odoo/openerp-server" ]
7480# Default command
7581ENTRYPOINT ["/entrypoint.sh" ]
7682CMD ["openerp-server" ]
You can’t perform that action at this time.
0 commit comments