Table of Content
The goal of this project is to provide a production-ready Alfresco system running in Docker.
We have released 4 docker images to create a full stack docker alfresco installation. We are targeting small and flexible images, to be easily tested on your laptop with Docker-Compose or in production with docker-swarm.
These images are automatically built by Docker Cloud and based on official Tomcat images to be as standard as possible.
Plateforme | Docker | Image | GitHub |
---|---|---|---|
Alfresco Content Repository 5.2 | jeci/alfresco-platform | Hub Docker Jeci alfresco-platform | GitHub |
Alfresco Share 5.2 | jeci/alfresco-share | Hub Docker Jeci alfresco-share | GitHub |
Alfresco Solr 4 | jeci/alfresco-solr | Hub Docker Jeci alfresco-solr | GitHub |
LibreOffice 5.2 | jeci/alfresco-libreoffice | Hub Docker Jeci alfresco-libreoffice | GitHub Update: Alfresco x Collabora Online |
docker images
See «how-to-extend,chapter below» to look how easily we install https://www.alfresco.com/platform/governance-services-rm[Alfresco RM] on this images.
Quick Start (Ubuntu)
1. Install Docker
sudo apt-get install docker.io
sudo usermod -a -G docker `whoami`
sudo curl -L -o /usr/local/bin/docker-compose \
https://github.com/docker/compose/releases/download/1.12.0/docker-compose-`uname -s`-`uname -m`
sudo chmod `x /usr/local/bin/docker-compose
Read documentation to see how to install Docker and Docker-Compose
2. Running Alfresco
open a new terminal to load new group permission (or you will need to use sudo
to run next command)
wget https://raw.githubusercontent.com/jeremie-lesage/alfresco-docker-cloud/master/docker-compose.yml
docker-compose up -d
3. Play
Your server is now available : http://localhost:8080/share/ with login admin
/ admin
when you have finished, stop all with docker-compose down
command.
Sources
Source are available on Github :
- Main Project : https://github.com/jeremie-lesage/alfresco-docker-cloud
- https://github.com/jeremie-lesage/docker-alfresco-platform
- https://github.com/jeremie-lesage/docker-alfresco-share
- https://github.com/jeremie-lesage/docker-alfresco-solr
- https://github.com/jeremie-lesage/docker-alfresco-libreoffice
Report issues in github project
Requirements
With default configuration you need at least 2GB of RAM and 2 CPU.
Running Containers
in Command Line
If you don’t want to install docker-compose, you could run all containers in command line.
1. First, pull all images needed
docker pull jeci/alfresco-platform:5.2.g
docker pull jeci/alfresco-share:5.2.f
docker pull jeci/alfresco-solr:5.2.g
docker pull jeci/alfresco-libreoffice:5.3.6
docker pull postgres:9.4
2. Create directories for local storage
mkdir -p volumes/alf_data volumes/solr_data volumes/pg_data
mkdir -p logs/alfresco logs/share logs/solr
3. Run all containers
docker run -d --name "postgresql" \
-e POSTGRES_DB=alfresco \
-e POSTGRES_PASSWORD=alfresco \
-e POSTGRES_USER=alfresco \
-v "$PWD/volumes/pg_data:/var/lib/postgresql/data" \
postgres:9.4
docker run -d --restart always --name "libreoffice" jeci/alfresco-libreoffice:5.2.7
docker run -d --name "alfresco" \
-e CATALINA_OPTS="-Xmx1G -XX:`UseConcMarkSweepGC" \
-v "$PWD/volumes/alf_data:/opt/alf_data" \
-v "$PWD/logs/alfresco:/usr/local/tomcat/logs/" \
--link postgresql:postgresql \
--link libreoffice:libreoffice \
jeci/alfresco-platform:5.2.g
docker run -d -p "8080:8080" --name "share" \
-e CATALINA_OPTS="-Xmx1G -XX:`UseConcMarkSweepGC" \
-v "$PWD/logs/share:/usr/local/tomcat/logs/" \
--link alfresco:alfresco \
jeci/alfresco-share:5.2.f
docker run -d --name "solr" \
-e CATALINA_OPTS="-Xmx1G -XX:`UseG1GC" \
-v "$PWD/volumes/solr_data:/opt/solr_data" \
-v "$PWD/logs/solr:/usr/local/tomcat/logs/" \
--link alfresco:alfresco \
jeci/alfresco-solr:5.2.g
4. Play
Your server is now available : http://localhost:8080/share/ with login admin
/ admin
Logs are available in cli:
docker logs alfresco
or in local directories
ls logs/*
5. Clean up
docker stop share solr alfresco postgresql libreoffice
docker rm share solr alfresco postgresql libreoffice
rm -r ./logs
rm -r ./volumes
with Docker-Compose
Behind the Quick Start above, there is a docker-compose.yml
file that define services. You can easily customize this configuration.
You will find 4 services : alfresco
, share
, solr
and postgresql
. You must respect the service name because they are used in configuration files. Take care of version (tag) used because Alfresco and Share have different versions.
Below we modified ports definition to access Alfresco Platform on port 8080
and Alfresco Share on port 8081
.
version: '2'
services:
alfresco:
image: jeci/alfresco-platform:5.2.g
environment:
CATALINA_OPTS: "-Xmx1G -XX:`UseConcMarkSweepGC"
depends_on:
- postgresql
networks:
- internal
ports:
- "8080:8080"
volumes:
- "alf_logs:/usr/local/tomcat/logs/"
- "alf_data:/opt/alf_data"
tmpfs:
- /tmp
- /usr/local/tomcat/temp/
- /usr/local/tomcat/work/
share:
image: jeci/alfresco-share:5.2.f
environment:
CATALINA_OPTS: "-Xmx1G -XX:`UseConcMarkSweepGC"
depends_on:
- alfresco
networks:
- internal
ports:
- "8081:8080"
volumes:
- "share_logs:/usr/local/tomcat/logs/"
tmpfs:
- /tmp
- /usr/local/tomcat/temp/
- /usr/local/tomcat/work/
solr:
image: jeci/alfresco-solr:5.2.g
environment:
CATALINA_OPTS: "-Xmx1G -XX:`UseG1GC -XX:`ParallelRefProcEnabled -XX:G1HeapRegionSize=8m -XX:MaxGCPauseMillis=200"
depends_on:
- alfresco
networks:
- internal
volumes:
- "solr_logs:/usr/local/tomcat/logs/"
- "solr_data:/opt/solr_data"
tmpfs:
- /tmp
- /usr/local/tomcat/temp/
- /usr/local/tomcat/work/
libreoffice:
image: jeci/alfresco-libreoffice:5.2.7
restart: always
networks:
- internal
postgresql:
image: postgres:9.4
environment:
- POSTGRES_DB=alfresco
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
networks:
- internal
volumes:
- "pgsql_data:/var/lib/postgresql/data"
volumes:
alf_logs:
alf_data:
share_logs:
solr_logs:
solr_data:
pgsql_data:
networks:
internal:
docker-compose.yml
Then re-run docker-compose to reload new configuration :
docker-compose up -d
Now you can try Alfresco Share http://localhost:8081/share/ or Alfresco Plateform http://localhost:8080/alfresco/.
You can check out logs per services:
docker-compose logs alfresco
docker-compose logs share
docker-compose logs solr
How to Extend
You can easily add custom modules or configuration with these images.
Adding custom AMP module
You have to make your own Docker image. Below is a simple example adding Alfresco RM 2.5 to our base images.
First download Alfresco RM modules in local directory.
wget https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco/alfresco-rm-community-repo/2.5.b/alfresco-rm-community-repo-2.5.b.amp
wget https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco/alfresco-rm-community-share/2.5.b/alfresco-rm-community-share-2.5.b.amp
Then create 2 Dockerfile, for Alfresco Plateform Dockerfile-Alfresco
and for Alfresco Share Dockerfile-Share
FROM jeci/alfresco-platform:5.2.g
COPY alfresco-rm-community-repo-2.5.b.amp /root/amp
RUN java -jar /root/alfresco-mmt.jar install /root/amp/ /usr/local/tomcat/webapps/alfresco -nobackup -directory
Dockerfile-Alfresco
FROM jeci/alfresco-share:5.2.f
COPY alfresco-rm-community-share-2.5.b.amp /root/amp
RUN java -jar /root/alfresco-mmt.jar install /root/amp/ /usr/local/tomcat/webapps/share -nobackup -directory
Dockerfile-Share
Then build this two images :
docker build -f Dockerfile-Alfresco -t alfresco-platform-rm:2.5.b .
docker build -f Dockerfile-Share -t alfresco-share-rm:2.5.b .
don’t forget the last point ‘.’
Update your docker-compose.yml file to load your images.
services:
alfresco:
image: alfresco-platform-rm:2.5.b
[...]
share:
image: alfresco-share-rm:2.5.b
[...]
docker-compose.yml
Finaly reload your services :
docker-compose up -d
This command will restart all services but postgresql
, because it is not depending on Alfresco. Your volumes remain unchanged so your data are still there (databases, contentstore and solr indexes).