[Mayan EDMS: 1496] Upgrade with docker

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 1496] Upgrade with docker

Mirco Hansen
Hello,

first of all thanks for the software and the effort. As I work with Mayan for around two weeks I have a question regarding upgrading it with docker ( I am working with 2.1.6)

As I need OCR for german language I downloaded the image from https://gitlab.com/mayan-edms/mayan-edms-docker and modified the Dockerfile and add the needed tesseract-packages. My question now: how do I upgrade using docker?
- Download image
- edit Dockerfile
- built the image
- run mayan:init
- copy document_storage and database back to mayan_media
- run the container

Is that the correct approach? Will the database (if needed) updated automatically?

Thank you in advance.

Cheers
Mirco

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 1497] Re: Upgrade with docker

rosarior
Administrator
Hi,

That is one way to do it. I would recommend that you create your own Dockerfile that uses the official Mayan image as a base and build your image instead.
This is how Docker works, by layering images. Example:

# Custom Dockerfile to add German OCR library
     # This Dockerfile uses the official Mayan EDMS image
     # as a base.

FROM mayanedms/mayanedms

ENV DEBIAN_FRONTEND noninteractive

# Install base Ubuntu libraries
RUN apt-get update && \

apt-get install -y --no-install-recommends \
        tesseract-ocr-deu
&& \

apt-get clean autoclean && \

apt-get autoremove -y && \

rm -rf /var/lib/apt/lists/* && \

rm -f /var/cache/apt/archives/*.deb

ENTRYPOINT ["/entrypoint.sh"]
CMD ["mayan:start"]

The you build your own Mayan image using your custom Dockerfile, and tag it as your own to differenciate it from the official image:

docker build -t mirco/mayanedms . 

Then you use all the normal subsequent commands. You change when it reads mayanedms/mayanedms to mirco/mayanedms

There is no need to copy the volumes, they should be preserved even after deleting the containers. No need to upgrade 
the database either since you will be using the same 2.1.6 version, only with the tesseract German files added, but still
same Mayan version.



On Tuesday, February 7, 2017 at 5:34:43 AM UTC-4, Mirco Hansen wrote:
Hello,

first of all thanks for the software and the effort. As I work with Mayan for around two weeks I have a question regarding upgrading it with docker ( I am working with 2.1.6)

As I need OCR for german language I downloaded the image from <a href="https://gitlab.com/mayan-edms/mayan-edms-docker" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgitlab.com%2Fmayan-edms%2Fmayan-edms-docker\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFjhttqCjIRi36i7ml_1w-4X4d3ag&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgitlab.com%2Fmayan-edms%2Fmayan-edms-docker\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFjhttqCjIRi36i7ml_1w-4X4d3ag&#39;;return true;">https://gitlab.com/mayan-edms/mayan-edms-docker and modified the Dockerfile and add the needed tesseract-packages. My question now: how do I upgrade using docker?
- Download image
- edit Dockerfile
- built the image
- run mayan:init
- copy document_storage and database back to mayan_media
- run the container

Is that the correct approach? Will the database (if needed) updated automatically?

Thank you in advance.

Cheers
Mirco

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.