Create my custom theme and upload it to Docker Desktop for Windows

cancel
Showing results for 
Search instead for 
Did you mean: 
Active Member II

Create my custom theme and upload it to Docker Desktop for Windows

Jump to solution

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?

fotolunes1.PNG

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).

fotolunes2.PNG

1 Solution

Accepted Solutions
Moderator
Moderator

Re: Create my custom theme and upload it to Docker Desktop for Windows

Jump to solution

@carloshc95 

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: 

https://github.com/abhinavmishra14/alfresco-metadataextraction-demo/blob/master/metadata-extractor-d...

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

 

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)

View solution in original post

3 Replies
Moderator
Moderator

Re: Create my custom theme and upload it to Docker Desktop for Windows

Jump to solution

@carloshc95 

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: 

https://github.com/abhinavmishra14/alfresco-metadataextraction-demo/blob/master/metadata-extractor-d...

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

 

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)

View solution in original post

Active Member II

Re: Create my custom theme and upload it to Docker Desktop for Windows

Jump to solution

 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.

 

 

Moderator
Moderator

Re: Create my custom theme and upload it to Docker Desktop for Windows

Jump to solution

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:

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)