0

I am using Ubuntu 18. Here is my dockerfile

# Please install Odoo 14 by this link
# http://nightly.odoo.com/14.0/nightly/deb/odoo_14.0.20210407.tar.xz
#
# https://hub.docker.com/layers/odoo/library/odoo/latest/images/sha256-04384b61e1ef32f4814c443599bb8252c368270ce9c3f86e368c6510396c291e?context=explore
#FROM odoo-14-local
FROM odoo:14.0@sha256:04384b61e1ef32f4814c443599bb8252c368270ce9c3f86e368c6510396c291e

# Setup with root
USER root

RUN pip3 install --upgrade pip

# Install custom Python packages
COPY ./requirements.txt /etc/odoo/

# Odoo docker image installed docutils 0.14, use --ignore-installed to bypass the following message
# It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
# https://stackoverflow.com/questions/38613316/how-to-upgrade-pip3/56917379
RUN pip3 install --ignore-installed -r /etc/odoo/requirements.txt
RUN apt-get update && apt-get install htop vim -y

COPY ./odoo.conf /etc/odoo/

RUN chown www-data /etc/odoo/odoo.conf

I did not touch requirements.txt and odoo.conf at all and it takes ~5 minutes everytime to run docker build. What am I doing wrong?

tom10271
  • 4,222
  • 5
  • 33
  • 62
  • Ok the big problem is Docker will just copy EVERYTHING in the directory no matter what. I need to add a docker ignore file to exclude those files and directory that I am not going to use at all in the docker container. It is now fast – tom10271 Sep 22 '21 at 14:42
  • If your setup uses Docker but every last bit of actual code is on your host, a lighter-weight tool like a Python virtual environment might be a better match. – David Maze Sep 22 '21 at 14:55

0 Answers0