[Testing WG] Update Dockerfile of each projects to reduce image size


xudan
 

Hi all,

 

I have submitted PR (named “Update Dockerfile to reduce the image size”) to each project to update the Dockerfiles which  could significantly reduce the Docker image size.

Following tables are list the details of every project. It could totally reduce more than 1G Size.

Please help to review the PRs carefully and merge it if there is no problem.

If you have any further questions, please feel free to contact me.

 

Java Project Name

Old Size

New Size

Reduce

Dependency

api-emulator

184M

146M

38M

Related PR in ci-management to update the docker build Jenkins jobs

https://gitee.com/edgegallery/ci-management/pulls/145/files

 

appstore-be

264M

186M

78M

developer-be

306M

207M

98M

mecm-apm

509M

442M

67M

mecm-appo

267M

188M

80M

mecm-inventory

227M

168M

59M

user-mgmt

293M

201M

92M

Total

 

 

512M

 

JavaScript Project Name

Old Size

New Size

Reduce

Dependency

appstore-fe

291M

200M

91M

1. Related PR in ci-management to update the docker build Jenkins jobs

https://gitee.com/edgegallery/ci-management/pulls/145/files

2. Also update website-gateway docker image

https://gitee.com/edgegallery/website-gateway/pulls/18/files

 

atp-fe

284M

196M

88M

developer-fe

301M

205M

96M

mecm-fe

298M

203M

95M

Total

 

 

370M

 

 

Go Project Name

Old Size

New Size

Reduce

mecm-applcm

62M

35.8M

26M

mecm-applcm-k8splugin

146M

77.7M

68M

mecm-apprulemgr

46.7M

28.2M

18M

mep

127M

68.5M

59M

mepauth

51.4M

30.6M

21M

mep-dns-server

44M

26.9M

17M

mep-agent

46M

27.9M

18M

plugins

102M

55.9M

46M

Total

 

 

273M

 

 

Note:

What I have done to do with the Dockerfile is just swapping the sequence of copy files and change files:

1.       Change the mode and owner of the related files and directories created in Docker container first

2.       Change the mode and owner of the files needed to be copied into container

3.       Copy related files into container

With the new sequence, it avoid to change the big files copied into container in another docker image layer which could avoid to recount the big files for several times.

 

BR,

Dan Xu

Join main@edgegallery.groups.io to automatically receive all group messages.