It is a good idea to keep backups, but Its up to you whether you want to keep a back up file or not.
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 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
Hi @akash251998,
Thanks for updating - it helps other people to know what worked.
Cheers,
Thanks @akash251998 , good to hear.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.