06-19-2019 01:04 AM
I have installed alfresco 6 using docker and its working.
I have made some customization and I want to deploy that as jar in alfresco.
How can I deploy that?
08-12-2019 11:29 AM
It would be better if you could use SDK to build the image with your customization within. Else you will have to manually deploy the jar files/amps/configs every time.
If you attempting to apply amps, You can copy your amp file directly to "$TOMCAT_DIR/amps (/usr/local/tomcat/amps)" and try if that works.
This is what you would see in $TOMCAT_DIR/amps. A Dockerfile and some amps.
If you open Dockerfile in editor, you can see it is trying to apply all the amps:
08-16-2019 10:25 AM
All is working, thanks!
08-07-2019 11:17 AM
If you are using SDK, then simply add the dependency under repo/share docker module e.g.
<dependencies>
<dependency>
<groupId>com.github.abhinavmishra14</groupId>
<artifactId>acs6-project-platform</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>com.github.abhinavmishra14</groupId>
<artifactId>acs6-project-integration-tests</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<!-- Add any additional AMPs or extension JARs here that you want to be deployed in Alfresco -->
</dependencies>
After adding the dependency, build the project again. Use /run.bat (run.sh) build_start.
Copy the jar file to lib folder of acs and share if you are not building via sdk::
$TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/ (for repo layer) e.g. /usr/local/tomcat/webapps/alfresco/WEB-INF/lib/
$TOMCAT_DIR/webapps/share/WEB-INF/lib/ (for share). e.g. /usr/local/tomcat/webapps/share/WEB-INF/lib/
The above directory structures are from Alfresco 6.1 based on docker
08-08-2019 11:14 AM
I just copied my jars to $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/ and restarted via docker-compose restart and nothing happened, it doesnt see the module
08-08-2019 04:46 PM
Vladimir Ivanov I am not sure how you copied the files and what steps you followed to restart the container. But it works as mentioned.
Can you try the steps as i have outlined below:
Suppose I have a "javascript-console-repo" module jar file which i wanted to copy to the lib folder i.e. $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/ (/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/)
Steps:
1- Confirm what all modules are installed by tailing the log of already running container:
6 modules found:
2- Find out the container id using below command:
"docker container ls"
3- Take the container id of alfresco repository and get the full container id.
"docker inspect -f '{{.Id}}' <CONTAINER_ID>"
e.g. docker inspect -f '{{.Id}}' c2379f72c0cd (here c2379f72c0cd is the container id)
4- Using full container id, execute the below given command to copy the file to appropriate location:
"docker cp D:\addOns\javascript-console-repo-0.6.jar c2379f72c0cd27b052f2b09a8d6e8926ac8676b0fa995eca8de4ce736c602d90:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib"
Jar file is located in a folder on my windows laptop.
5- Check if the jar file is copied to correct location, run following command to connect to container:
"docker exec -t -i docker_acs6-aio-demo-project-acs_1 /bin/bash" (here docker_acs6-aio-demo-project-acs_1 is the name of my alfresco container)
After you connect to container, use the command: "find / -name javascript-console-repo-0.6.jar" to locate the jar file recently copied.
6- Now restart the container, use following command:
"docker restart <CONTAINER_ID>"
e.g. docker restart c2379f72c0cd (here c2379f72c0cd is the container id)
7- Tail the log to see latest modules list:
7 Modules found. see newly added module as highlighted:
08-12-2019 07:57 AM
I just copied my jar file(what about non-jars files?) to alfresco repo container into "container_id:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib" and made docker-compose restart, but there no modules except Alfresco / Google Docs Share Module (watching via modules browser via share).
Also, if there any way to install amp module into docker container? I'm trying this via
alfresco-mmt.jar
but gets error "Error: Unable to access jarfile alfresco-mmt/alfresco-mmt.jar"
As I see another issues, it is recommended not to install modules in containers and to make own docker images, so is it really impossible to install modules into docker?
08-12-2019 11:29 AM
It would be better if you could use SDK to build the image with your customization within. Else you will have to manually deploy the jar files/amps/configs every time.
If you attempting to apply amps, You can copy your amp file directly to "$TOMCAT_DIR/amps (/usr/local/tomcat/amps)" and try if that works.
This is what you would see in $TOMCAT_DIR/amps. A Dockerfile and some amps.
If you open Dockerfile in editor, you can see it is trying to apply all the amps:
08-16-2019 10:25 AM
All is working, thanks!
Explore our Alfresco products with the links below. Use labels to filter content by product module.