Skip to content

Instantly share code, notes, and snippets.

@moylop260
Last active March 11, 2017 22:48
Show Gist options
  • Select an option

  • Save moylop260/29b6f13122b80036fce3 to your computer and use it in GitHub Desktop.

Select an option

Save moylop260/29b6f13122b80036fce3 to your computer and use it in GitHub Desktop.

t2d git@github.com:Vauxoo/runbot-addons.git 9.0

  • Abrir */2/Dockerfile:
  • Comentar toda invocación al comando docker
  • Agregar al final:
RUN curl -sSL https://get.docker.com/ | sh
VOLUME ['/var/lib/docker']
RUN cp -r /.repo_requirements/odoo/.git /root/odoo-extra/runbot/static/repo/https___github.com_odoo_odoo.git \
 && cd /root/odoo-extra/runbot/static/repo/https___github.com_odoo_odoo.git \
 && git remote remove oca \
 && git remote remove vauxoo \
 && git remote rename odoo origin \
 && git fetch origin
  • Correr con:
  • */2/20-run.sh "--entrypoint=bash --privileged=true -v /var/lib/docker:/var/lib/docker"
  • or */2/20-run.sh "--entrypoint=bash -v /var/run/docker.sock:/var/run/docker.sock" # To run containers from main docker
  • (Si es en un dkr-in-dkr from raditz, use:
  • */2/20-run.sh "--entrypoint=bash --privileged=true -v /root/dkr-in-dkr-volume/runbot:/var/lib/docker"
  • (Si es dentro de un docker-machine, use:)
  • */2/20-run.sh "--entrypoint=bash --privileged=true -v /mnt/sda1/dkr-in-dkr-volume/runbot:/var/lib/docker"
  • Dentro del container:
  • Correr
sed -i '2i/etc/init.d/docker start' /entrypoint.sh
sed -i '3idocker run -d -p 5000:5000 --name registry registry:2' /entrypoint.sh
sed -i '4idocker start registry' /entrypoint.sh
  • Si tu no tienes esta imagen, la puedes descargar: docker pull vauxoo/odoo-80-image-shippable-auto
  • Levantar instancia: /entrypoint.sh

Clear instance after use:

  • Execute:
pkill python
service postgresql restart
service docker restart
sleep 2
docker start registry

# Just if is needed
dropdb openerp_test
docker rm -f registry
/entrypoint.sh

# If you want avoid to use the entrypoint
~/odoo-9.0/odoo.py -u runbot_travis2docker -d openerp_test --test-enable --stop-after-init --log-level=debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment