ADF Docker practical guide

cancel
Showing results for 
Search instead for 
Did you mean: 

ADF Docker practical guide

Alfresco Employee
5 6 4,567

Introduction

Nowadays most of the application around the world are moving in a transformation where everything is in a container. Docker is now a buzzword and almost every software is possible to find on Docker hub. As ADF team we started the development of the framework since the beginning taking advantages of Docker.

 

If you want to try to execute the demo shell code of ADF you are most probably thinking about to download the code from GitHub, install dependencies from NPM and start the project. 

The good news is that there is a simple way if you want just try the latest and good things.

Demo shell with Docker

You can start the demo shell with only one command using Docker from your command line:

If you don't have docker already installed in your environment maybe you want before visit this link Install Docker | Docker Documentation 

docker run -it --rm --name demo-shel -p 80:80 alfresco/demo-shell:development‍‍‍‍

After that, you run this command you should have in your shell something similar to:

At this point open in your browser http://localhost/login to reach the demo shell.

Note this docker image doesn not contai the Content services and the Process services services. This image contain only the Demo shell client part

In order to make it works with your CS/PS you need to bring up your services on the following ports:

  • Activiti Enterprise Edition (running on port 9999).
  • Alfresco Community Edition (running on port 8080).

This Docker image already provides a CORS filter so you don't need to configure it.

Demo shell docker tag strategy

As you can guess from the last part of the command in this way you are using the last demo shell present in the development branch. What if you want to use another version. Docker hub support tags and we have in our demo shell docker repo the following tag startegy:

  • ADF Development Branch [Not Stable] ( alfresco/demo-shell:development)
  • ADF Master Branch (alfresco/demo-shell:master)
  • ADF latest build [Not stable] (alfresco/demo-shell:latest)
  • Version specific tag has been introduced since 2.1.0 ADF version (alfresco/demo-shell:2.1.0)

Example content app with Docker

If you are wondering if we are followed the same strategy also for the alfresco content app the answer is YES.

You can start the alfresco content app with the following command:

docker run -it --rm --name demo -p 80:80 alfresco/alfresco-content-app:development‍‍

At this point open in your browser http://localhost/login to reach the content app.

ACA app

Conclusion

Before to leave I want to give you some links that maybe you can find usefull:

If you have more questions, please reply here or contact us using gitter

6 Comments
Customer

Hi:

I can run both of them, but only auth in the demo shell (and not in the alfresco-content-app). Am I missing something ?

Regards.

--C. 

Alfresco Employee

Sorry Cesar, Is not clear to me your question

Customer

Hi Eugenio:

Thanks for your message and for the ADF docker resources. I'm not very familiarized with ADF stuff, maybe it is a very trivial question. I used an Alfresco Community 5.2 instance 201707GA with CORS enabled (via jar plugin) for testing Content Services at localhost. When I run the demo-shell docker command, all things worked like a charm, I could login in the demo-shell and to use Content Services.

But when I did the same thing for alfresco-content-app command, I arrive to the login page, but I always obtain an authentication error. In this case besides, there is no option to configure the Content Services endpoint in the web interface. Do I miss something ?

Thanks in advance and best regards.

--C. 

Alfresco Employee

Hello, Cesar. The ACA image references localhost as we had it as part of the broader setup. We will address this issue, meanwhile you can play with the whole stack we used at DevCon sessions for ACA: Denys Vuika / aca-cloud-community · GitLab 

Customer

Thank you very much Denys for the quick answer, I will check the project.

Best regards.

--C.

Customer

This worked fine Denys. 

Thanks again.

--C.