Installing Alfresco 6 Community Edition in Ubuntu using Docker Compose

cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Alfresco 6 Community Edition in Ubuntu using Docker Compose

angelborroy
Alfresco Employee
6 17 12.6K

Installation methods

Alfresco Content Services can be installed in some different ways:

Alfresco Docker Images

The public Alfresco Docker images are available in the Docker Hub registry.

Go to Docker Hub https://hub.docker.com/u/alfresco/ to see a list of images belonging to the alfresco user.

There are a number of Docker images that relate to Alfresco Community Edition:

  • alfresco/alfresco-content-repository-community - the repository app (i.e. alfresco.war) running on Apache Tomcat
  • alfresco/alfresco-share - the Share web interface (i.e. share.war) running on Apache Tomcat
  • alfresco/alfresco-search-services - the Solr 6 based search service running on Jetty
  • alfresco/alfresco-activemq - the Alfresco ActiveMQ image
  • alfresco/acs-community-ngnix - Http Web Proxy to provide access to every service using the same port

The source code to build these Docker Images is available in Alfresco GitHub page.

There are also other supporting features available, such as Docker images for image and document transformation:

  • alfresco/alfresco-imagemagick
  • alfresco/alfresco-libreoffice
  • alfresco/alfresco-pdf-renderer
  • alfresco/alfresco-tika
  • alfresco/alfresco-transform-misc
  • alfresco/alfresco-transform-core-aio

The source code to build these Docker Images is available in https://github.com/Alfresco/alfresco-transform-core

Additionally sample Docker Compose templates to deploy ACS Community is available in https://github.com/Alfresco/acs-deployment/tree/master/docs/docker-compose

Since these Docker Compose templates don't include some real world features, like persistent storage or modules deployment, a Yeoman Generator is provided in order to configure your deployment: https://github.com/Alfresco/alfresco-docker-installer.

Alfresco Docker Installer

This project, available in https://github.com/Alfresco/alfresco-docker-installer, generates a Docker Compose template ready to be used including following features:

  • RAM limits for every service according to global memory available for Docker
  • PostgreSQL or MariaDB as database (no other option but MySQL is supported for Community)
  • Search Services configured for environments using several languages for contents or from operative systems / browsers
  • Outbound Email service (smtp)
  • LDAP service for identification (based in OpenLDAP)
  • Several addons available

This program requires Node.js and Yeoman Generator.

Installing Alfresco in Ubuntu 20.04 LTS

In order to use Alfresco Docker Installer on an Ubuntu server, some dependencies need to be installed.

Let's start updating the packages in your Ubuntu server.

$ sudo apt update

Install Docker using default instructions from https://docs.docker.com/engine/install/ubuntu/

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

$ sudo apt-get install docker-ce docker-ce-cli containerd.io

$ sudo docker -v
Docker version 20.10.0, build 7287ab3

Also Docker Compose is required, so follow default instructions from https://docs.docker.com/compose/install/

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

$ sudo chmod +x /usr/local/bin/docker-compose

$ sudo docker-compose -v
docker-compose version 1.27.4, build 40524192

Node.js is required to run the Alfresco Docker Installer, despite it's not required to run Alfresco with Docker Compose. Install this program using the following commands.

$ sudo apt install nodejs

$ sudo apt install npm

And finally, Alfresco Docker Installer dependencies should be installed.

$ sudo npm install -g yo

$ sudo npm install --global generator-alfresco-docker-installer

From this point, every dependency is installed in your Ubuntu server, so we can create a new Docker Compose template to deploy Alfresco Community.

$ yo alfresco-docker-installer

? Which ACS version do you want to use? 6.2
? How may GB RAM are available for Alfresco (8 is minimum required)? 12
? Do you want to use HTTPs for Web Proxy? No
? What is the name of your server? server.com
? What HTTP port do you want to use (all the services are using the same port)? 80
? Do you want to use FTP (port 2121)? No
? Do you want to use MariaDB instead of PostgreSQL? No
? Are you using different languages (this is the most common scenario)? Yes
? Do you want to create an internal SMTP server? No
? Do you want to create an internal LDAP server? No
? Select the addons to be installed:
? Are you using a Windows host to run Docker? No
? Do you want to use a start script? No
   create .env
   create docker-compose.yml
   create alfresco/Dockerfile
   create alfresco/modules/amps/empty
   create alfresco/modules/jars/empty
   create share/Dockerfile
   create share/web-extension/share-config-custom-dev.xml
   create share/modules/amps/empty
   create share/modules/jars/empty
   create search/Dockerfile
   create config/nginx.htpasswd

Remember to use the real server name for your Ubuntu server ("server.com" is used in the sample above).

As we are installing in Linux, some permission changes need to be done to Docker mounted volumes. Details for this operation are available in https://github.com/Alfresco/alfresco-docker-installer#docker-volumes

$ mkdir -p data/solr-data
$ sudo chown -R 33007 data/solr-data

$ mkdir -p logs/postgres
$ sudo chown -R 999 logs/postgres

From this point, Docker Compose is ready to be started.

$ sudo docker-compose up --build --force-recreate

...
alfresco_1               | 17-Dec-2020 10:21:11.697 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 133849 ms

Once everything is up & ready, following URLs should be available (with admin/admin credentials by default):

Live Demo

Video recording related with this Docker Compose deployment in Ubuntu is available in:

 

 

About the Author
Angel Borroy is Senior Software Engineer in Alfresco. Over the last 15 years, he has been working as a software architect on Java, BPM, document management and electronic signatures. He has been working with Alfresco during the last years to customize several implementations in large organizations and to provide add-ons to the Community based on Record Management and Electronic Signature. He writes (sometimes) on his personal blog http://angelborroy.wordpress.com. He is (proud) member of the Order of the Bee. Angel Borroy is Engineer at Alfresco.
17 Comments
fmayconcs
Active Member

Hi! @angelborroy, very good this tutorial! It clarified several doubts and I learned about several other configurations!
I wonder if these versions of share (6.2.1) and repo (6.2.0-ga) are still the stable versions used for production environments? Or are there other, more current stable versions? What would these be?

Is there a document that describes how to identify versions of stable alfresco images, test images ... that are in the doker repository?

Thankful!

angelborroy
Alfresco Employee

The latest version for Alfresco Community are described in this page:

https://www.alfresco.com/thank-you/thank-you-downloading-alfresco-community-edition

6.2.0-ga is the latest one.

You may check also https://github.com/alfresco/alfresco-docker-installer, that creates a Docker Compose with the latest GA versions.

fmayconcs
Active Member

Hi! Thank you very much for responding @angelborroy!
Is there a tutorial where we can also build a Docker Compose with GA versions for the Alfresco Governance Community? Or can I make a dockefile to deploy RM amps in this Alfresco Community Version 6.2-GA?
Thank you again!

kenmurambi
Member II

Thanks @angelborroy for this guide. I used @abhinavmishra14 windows setup guide and noticed that the documents section was greyed out as depicted in the attached image. How do i resolve this?

abhinavmishra14
Moderator
Moderator

Here is part2 of setup acs on centos using distribution package: 

https://javaworld-abhinav.blogspot.com/2021/02/setup-acs62-ga-and-ass14-distribution-stepbystep-cent...

gegepotam
Member II

Hello! I experience come problemds during folowing this guide on Ubuntu 20.04.

First - Docker can not be installed because of missing focal release. The right code helped me is:

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   bionic \
   stable"

And now I'm stucked with error after doing "yo alfresco-docker-installer"

root@alf79:~# yo alfresco-docker-installer
/usr/local/lib/node_modules/yo/node_modules/conf/index.js:128 throw err; ^ Error: EACCES: permission denied, open '/root/.config/insight-nodejs/insight-yo.json' at Object.openSync (fs.js:443:3) at Object.readFileSync (fs.js:343:35) at Conf.get store [as store] (/usr/local/lib/node_modules/yo/node_modules/conf/index.js:108:18) at Conf.get (/usr/local/lib/node_modules/yo/node_modules/conf/index.js:47:27) at Insight.get optOut [as optOut] (/usr/local/lib/node_modules/yo/node_modules/insight/lib/index.js:52:22) at Object.<anonymous> (/usr/local/lib/node_modules/yo/lib/cli.js:205:48) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

Can you help me figure this out please?

angelborroy
Alfresco Employee
Alfred2
Active Member II

Hello,

I have an Alfresco Share v5.1.f and Alfresco Community v5.1.0 installed on a Windows Server 2012,

I would like to migrate this version of Alfresco to the new version Alfresco 7 Community Edition,

it is possible to go from alfresco 5.1.f to alfresco 7 ?

 

Thanks!

sheikhakramul
Active Member

When i login alfresco am facing this Error ( Your authentication details have not been recognized or Alfresco may not be available at this time.) & (If it is possible to delete the super admin credentials)

 

 

EddieMay
Community Manager
Community Manager

Hi @Alfred2 

You may find this thread useful.

Cheers,

EddieMay
Community Manager
Community Manager

Hi @sheikhakramul 

At first glance it looks like the Alfresco repository application has not started. What happens if you go to http://localhost:8080/alfresco?

Make sure you have sufficient memory allocated to Alfresco - this is often the cause of such problems.

If you are still having problems, raise a post in the ACS forum.

Cheers,

Eddie

sheikhakramul
Active Member

Hi@EddieMay,

Thanks for your reply !

http://serverip (Alfresco Content Application ) site working

http://serverip/share/page    ( both site working)

 but admin/admin crendetials not working for above sites

and 

http://serverip/alfresco? not working it showing error 404

[No webpage was found for the web address: http://serverip/alfresco/

HTTP ERROR 404]
 

I am using AWS Instance 4 core 8GB RAM ubuntu 20.4

What is the minimum ram required for Alfresco community  ??  please suggest

or do you have any solutions to run the Alfresco repository application and all sites with default admin/admin user name and password?

Looking forward to your kind support to resolve this issue.

Thanks !

sheikhakramul
Active Member

Hello! I experience come problems during folowing this guide on Ubuntu 20.04.

Now I'm stucked with error -13 after doing "yo alfresco-docker-installer"

 

errorerror

sheikhakramul
Active Member

Can you please support to resolve this issue?

 

angelborroy
Alfresco Employee
gegepotam
Member II

Try to do this under another user, using sudo, not under root. this helped me in same situation.

sheikhakramul
Active Member

@angelborroy @gegepotam 

Thank you !! for your early response and support I will try to follow your instructions.