06-08-2020 10:48 AM
Hi!
I am doing my project with alfresco 6.X and SDK 4.0.
I have already created the necessary users, groups, etc. and now I would like to modify the interface so that it more closely resembles that of my small business.
I have read this article to make my custom theme https://docs.alfresco.com/6.1/tasks/dev-extensions-share-tutorials-add-theme.html but I have two main questions:
1.- Where is the aio / aio-share-jar / src / main / resources / META-INF directory located?
2.- I am accessing the Share directory through Docker Desktop in Windows. How can I delete, copy and / or upload files from here?
I have downloaded this article https://docs.docker.com/engine/reference/commandline/cp/ but it is not very clear what my DEST_PATH is (since cmd I have run docker ps and the result is the following image).
06-09-2020 09:52 AM
Since you have sdk4.x based project, you don't need to copy or make changes directly on docker containers. You make changes in your custom modules and use run.bat/run.sh to launch or reload the customizations.
Hope you have read the README.md file which you get when you generate the aio project.
A sample of readme file is located here, it have plenty of info. You have to read and follow it:
To launch docker containers with alfresco and share :
./run.sh build_start or ./run.bat build_start
Once you launched containers and made some changes to modules after launch, use following command to reload acs/share:
./run.sh reload_acs or ./run.bat reload_acs ./run.sh reload_share or ./run.bat reload_share
"Where is the aio / aio-share-jar / src / main / resources / META-INF directory located?" --> It is at the same path in your custom module. You shouldn't looking for this path in containers. You need to put all your customizations in aio-share-jar module and reload share using the command shown above.
If you were to copy a file manually to any containers you can use following command:
##### Get container name or short container id: - `docker ps` ##### Get full container id: - `docker inspect -f '{{.Id}}' CONTAINER_ID` ##### Copy file: - `docker cp localFile FULLCONTAINER_ID:pathOnContainer` Example, i want to copy custom-log4j.properties from windows path to acs container: - `docker cp C:\custom-log4j.properties ac23e51fd0b5c4cc11a12133ceea16d603e7f105d8d39873c75d7cfdd5942e40:/usr/local/tomcat/shared/classes/alfresco/extension`
This "Alfresco 6.x with SDK4.x and docker command cheatseet" may be helpful to you: https://javaworld-abhinav.blogspot.com/2019/11/alfresco-6x-with-sdk4x-and-docker.html
06-09-2020 09:52 AM
Since you have sdk4.x based project, you don't need to copy or make changes directly on docker containers. You make changes in your custom modules and use run.bat/run.sh to launch or reload the customizations.
Hope you have read the README.md file which you get when you generate the aio project.
A sample of readme file is located here, it have plenty of info. You have to read and follow it:
To launch docker containers with alfresco and share :
./run.sh build_start or ./run.bat build_start
Once you launched containers and made some changes to modules after launch, use following command to reload acs/share:
./run.sh reload_acs or ./run.bat reload_acs ./run.sh reload_share or ./run.bat reload_share
"Where is the aio / aio-share-jar / src / main / resources / META-INF directory located?" --> It is at the same path in your custom module. You shouldn't looking for this path in containers. You need to put all your customizations in aio-share-jar module and reload share using the command shown above.
If you were to copy a file manually to any containers you can use following command:
##### Get container name or short container id: - `docker ps` ##### Get full container id: - `docker inspect -f '{{.Id}}' CONTAINER_ID` ##### Copy file: - `docker cp localFile FULLCONTAINER_ID:pathOnContainer` Example, i want to copy custom-log4j.properties from windows path to acs container: - `docker cp C:\custom-log4j.properties ac23e51fd0b5c4cc11a12133ceea16d603e7f105d8d39873c75d7cfdd5942e40:/usr/local/tomcat/shared/classes/alfresco/extension`
This "Alfresco 6.x with SDK4.x and docker command cheatseet" may be helpful to you: https://javaworld-abhinav.blogspot.com/2019/11/alfresco-6x-with-sdk4x-and-docker.html
06-09-2020 12:22 PM
hi! @abhinavmishra14
Thanks for your solution. Since eclipse I am able to configure everything without using the docker. But I still can't find the route
Alfresco / tomcat / webapps / share / themes / greenTheme
I have maven installed (C: \ Program Files \ apache-maven-3.6.3), but I can't find tomcat if it's not from the Docker console.
06-09-2020 12:36 PM
You can find the "greenTheme" by navigating to share container via SSH. You can look for various commands available in the cheatsheet blog i shared with you.
##### SSH Into a docker image: - `docker exec -t -i <containerName/Id> /bin/bash` docker exec Options: -d, --detach Detached mode: run command in the background --detach-keys string Override the key sequence for detaching a container -e, --env list Set environment variables -i, --interactive Keep STDIN open even if not attached --privileged Give extended privileges to the command -t, --tty Allocate a pseudo-TTY -u, --user string Username or UID (format: <name|uid>[:<group|gid>]) -w, --workdir string Working directory inside the container Example (SSH into share container): - `docker exec -t -i docker_acs6-aio-demo-project-share_1 /bin/bash`
Once you are logged in to the container, go to ('cd' to the path) : $TOMCAT_HOME/webapps/share/themes/greenTheme
Zip the greenTheme folder and download it locally.
You can take reference from these projects here:
Explore our Alfresco products with the links below. Use labels to filter content by product module.