Deploy amp or jar into dockerized alfresco 6.1

cancel
Showing results for 
Search instead for 
Did you mean: 
abhinavmishra14
Advanced

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

It is a good idea to keep backups, but Its up to you whether you want to keep a back up file or not.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
akash251998
Established Member II

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

I have copied the pdf-toolkit-repo-1.4.4-SNAPSHOT.amp to the location /usr/local/tomcat/amps after that i have run the command :  java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install /usr/local/tomcat/amps_share /usr/local/tomcat/webapps/share -directory -nobackup -force

 But it is giving error in the command line: Error: Unable to access jarfile /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar

abhinavmishra14
Advanced

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

@akash251998 wrote:

I have copied the pdf-toolkit-repo-1.4.4-SNAPSHOT.amp to the location /usr/local/tomcat/amps after that i have run the command :  java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install /usr/local/tomcat/amps_share /usr/local/tomcat/webapps/share -directory -nobackup -force

 But it is giving error in the command line: Error: Unable to access jarfile /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar


@akash251998 You have copied the amp file at '/usr/local/tomcat/amps' but trying to run install from amps_share. It seems like you are trying to apply amps without connecting to containers.

 

Following syntax is used for copying local file to a container:

docker cp localFile FULLCONTAINER_ID:pathOnContainer

##### Get container name or short container id:

- docker ps

##### Get full container id:

- docker inspect -f '{{.Id}}' CONTAINER_ID

CONTAINER_ID can be found using the 'docker ps' command given above.

Instructions to copy and apply amps for Alfresco:

1- Copy repo amp 'pdf-toolkit-repo-1.4.4-SNAPSHOT.amp' to "/usr/local/tomcat/amps" on ACS container

For example, repo amp 'pdf-toolkit-repo-1.4.4-SNAPSHOT.amp' is in c drive under alf-addon folder:
docker cp C:\alf-addon\pdf-toolkit-repo-1.4.4-SNAPSHOT.amp 2bf46dd1ae7dd05dd6e28a790d867e581376fa64f8482a124f25139de21ec96c:/usr/local/tomcat/amps where '2bf46dd1ae7dd05dd6e28a790d867e581376fa64f8482a124f25139de21ec96c' is full container id. See the commands above for getting this id for ACS container.

2- Connect to the container using below command:

docker exec -i -t <containerId> or <containerName> /bin/bash

Example: 

docker exec -i -t demo_alfresco_1 /bin/bash Here, 'demo_alfresco_1' is the name of acs container, alternatively you can use id as well.


3- Apply amp after connecting to bash shell of acs container using above command:

java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install /usr/local/tomcat/amps /usr/local/tomcat/webapps/alfresco -directory -nobackup -force

4- Restart container


Instructions to copy and apply amps for Share:

1- Copy repo amp 'pdf-toolkit-share-1.4.4-SNAPSHOT.amp' to "/usr/local/tomcat/amps_share" on Share container

docker cp C:\alf-addon\pdf-toolkit-share-1.4.4-SNAPSHOT.amp 653e41842aed205d3f18ef5b2be6816ab550eddea2161fb03f6168658c964545:/usr/local/tomcat/amps_share

2- Connect to the share container using below command:

docker exec -i -t demo_share_1 /bin/bash

Here, 'demo_share_1' is the name of share container.

3- Apply amp:

java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install /usr/local/tomcat/amps_share /usr/local/tomcat/webapps/share -directory -nobackup -force

4- Restart container

 

See previous solution for more details. Open a separate thread if you still see the problem. 

See this post on more docker and docker-compose related useful commands: 

https://javaworld-abhinav.blogspot.com/2019/11/alfresco-6x-with-sdk4x-and-docker.html

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
akash251998
Established Member II

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

Thanks @abhinavmishra14  it works. Thanks for your help.

 

Regards 

Akash

EddieMay
Alfresco Employee

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

Hi @akash251998,

Thanks for updating - it helps other people to know what worked.

Cheers, 

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
abhinavmishra14
Advanced

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

Thanks @akash251998 , good to hear.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)