Constraints and suggestions
- To ensure that you can use all functions of EDAS, do NOT modify Tomcat default boot scripts, directories or the path of logs.
- If a new version EDAS application is published, you need to re-package and publish the image to obtain new functions and features of EDAS. If the last packed image has been published for a long time, it is recommended that you update the basic image and re-package and publish it. For details, see Download an EDAS basic image.
- Directory list
- Tomcat directory: /home/admin/taobao-tomcat-production-18.104.22.168/
- Log directory: /root/logs/
- WAR package directory: /home/admin/taobao-tomcat-production-22.214.171.124/deploy/
Create a custom basic image
Use any of the following methods to create a custom basic image:
Method 1: Compile a Dockerfile
After pulling the expected basic image, compile a Dockerfile to prepare a standard image. The following examples describe how to publish a WAR package and modify Tomcat configurations.
Note: Do not use the CMD command to create the boot script for the custom image.
Example 1: Add the local application /tmp/edas-app.war to the image and publish the application in image mode.
ADD /tmp/edas-app.war /home/admin/taobao-tomcat-production-126.96.36.199/deploy/
Example 2: Replace server.xml and install the system monitoring tool SAR.
ADD /tmp/server.xml /home/admin/taobao-tomcat-production-188.8.131.52/conf/server.xml
RUN yum install -y sysstat
After compiling Dockerfile, publish the image.
Method 2: Use the local Docker command
Similar to the file copy command
cp, run the following command to copy the local file /tmp/app.war to the WAR package directory in the packaging environment.
|docker cp||Local file path||edas-build-package:container file path|
Take the preceding command as an example, run the following command to copy the local file /tmp/app.war to the WAR package deployment directory of the container:docker cp /tmp/app.war edas-build-package:/home/admin/taobao-tomcat-production-184.108.40.206/deploy/
Method 3: Download the remote file in the Docker container
Run docker exec -it edas-build-package bash to go to the container.
Run wget http://anything-you-want/local storage path to download the file.