from odoo:13.0
user root
RUN pip3 install --upgrade pip
RUN pip3 install paramiko -i https://pypi.douban.com/simple/
RUN pip3 install docxtpl -i https://pypi.douban.com/simple/
RUN sed -i "s/http:\/\/deb.debian.org/https:\/\/mirrors.163.com/g" /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y libreoffice
user odoo
注意最后有一个点,代表当前目录
注意:文件里 /Users/jeff 是我电脑上的目录,你要换成你自己的目录
version: '2'
services:
db:
container_name: pgsql
image: postgres:10.0
environment:
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
- POSTGRES_DB=postgres
- PGDATA=/var/lib/postgresql/data/pgdata
restart: always # run as a service
ports :
- "25432:5432"
volumes:
- ./log/pgsql:/var/log/postgresql
- odoo-db-data:/var/lib/postgresql/data/pgdata
gooderp13:
container_name: gooderp
image: gooderp:13
depends_on:
- db
ports:
- "8888:8069"
tty: true
command: -- -c /mnt/extra-addons/docker13.conf
volumes:
- /Users/jeff:/mnt/extra-addons
- ./log:/var/log/odoo
- odoo-web-data:/var/lib/odoo
restart: always # run as a service
volumes:
odoo-web-data:
odoo-db-data:
[options]
addons_path = /mnt/extra-addons/gooderp
db_host = db
db_port = 5432
db_user = odoo
db_password = odoo
最后的文件结构是这样:
your_directory