Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize layers of shenyu-admin Docker image #4962

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

TeslaCN
Copy link
Member

@TeslaCN TeslaCN commented Aug 5, 2023

Related to #4961.

Make sure that:

  • You have read the contribution guidelines.
  • You submit test cases (unit or integration tests) that back your changes.
  • Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.

Comparing to ghcr.io/apache/shenyu/admin:e8381465caf02063f01abe578c795d90602f3990
349MB -> 218MB

~> docker images ghcr.io/apache/shenyu/admin:e8381465caf02063f01abe578c795d90602f3990                           
REPOSITORY                    TAG                                        IMAGE ID       CREATED          SIZE
ghcr.io/apache/shenyu/admin   e8381465caf02063f01abe578c795d90602f3990   4b71f7e5f494   37 minutes ago   349MB

~> docker history ghcr.io/apache/shenyu/admin:e8381465caf02063f01abe578c795d90602f3990
IMAGE          CREATED          CREATED BY                                      SIZE      COMMENT
4b71f7e5f494   38 minutes ago   ENTRYPOINT ["/bin/sh" "entrypoint.sh"]          0B        buildkit.dockerfile.v0
<missing>      38 minutes ago   EXPOSE map[9095/tcp:{}]                         0B        buildkit.dockerfile.v0
<missing>      38 minutes ago   WORKDIR /opt/shenyu-admin                       0B        buildkit.dockerfile.v0
<missing>      38 minutes ago   RUN |1 APP_NAME=apache-shenyu-*-admin-bin /b…   1.6kB     buildkit.dockerfile.v0
<missing>      38 minutes ago   COPY docker/entrypoint.sh /opt/shenyu-admin/…   1.6kB     buildkit.dockerfile.v0
<missing>      38 minutes ago   COPY docker/logback.xml /opt/shenyu-admin/co…   1.9kB     buildkit.dockerfile.v0
<missing>      38 minutes ago   RUN |1 APP_NAME=apache-shenyu-*-admin-bin /b…   131MB     buildkit.dockerfile.v0
<missing>      38 minutes ago   ADD target/apache-shenyu-*-admin-bin.tar.gz …   131MB     buildkit.dockerfile.v0
<missing>      38 minutes ago   RUN |1 APP_NAME=apache-shenyu-*-admin-bin /b…   3.38MB    buildkit.dockerfile.v0
<missing>      38 minutes ago   ENV ADMIN_JVM=                                  0B        buildkit.dockerfile.v0
<missing>      38 minutes ago   ENV LOCAL_PATH=/opt/shenyu-admin                0B        buildkit.dockerfile.v0
<missing>      38 minutes ago   ARG APP_NAME                                    0B        buildkit.dockerfile.v0
<missing>      4 years ago      /bin/sh -c set -x  && apk add --no-cache   o…   78.1MB    
<missing>      4 years ago      /bin/sh -c #(nop)  ENV JAVA_ALPINE_VERSION=8…   0B        
<missing>      4 years ago      /bin/sh -c #(nop)  ENV JAVA_VERSION=8u212       0B        
<missing>      4 years ago      /bin/sh -c #(nop)  ENV PATH=/usr/local/sbin:…   0B        
<missing>      4 years ago      /bin/sh -c #(nop)  ENV JAVA_HOME=/usr/lib/jv…   0B        
<missing>      4 years ago      /bin/sh -c {   echo '#!/bin/sh';   echo 'set…   87B       
<missing>      4 years ago      /bin/sh -c #(nop)  ENV LANG=C.UTF-8             0B        
<missing>      4 years ago      /bin/sh -c #(nop)  CMD ["/bin/sh"]              0B        
<missing>      4 years ago      /bin/sh -c #(nop) ADD file:66f49017dd7ba2956…   5.29MB


~> docker images apache/shenyu-admin:latest                                                                     
REPOSITORY            TAG       IMAGE ID       CREATED          SIZE
apache/shenyu-admin   latest    8a49890a92da   40 minutes ago   218MB

~> docker history apache/shenyu-admin:latest                                             
IMAGE          CREATED          CREATED BY                                      SIZE      COMMENT
8a49890a92da   41 minutes ago   /bin/sh -c #(nop)  ENTRYPOINT ["/bin/sh" "en…   0B        
49f4560774a6   41 minutes ago   /bin/sh -c #(nop)  EXPOSE 9095                  0B        
f143cae13d98   41 minutes ago   /bin/sh -c #(nop) WORKDIR /opt/shenyu-admin     0B        
2e295b773d56   41 minutes ago   /bin/sh -c chmod +x ${LOCAL_PATH}/entrypoint…   1.6kB     
469ae86cece9   41 minutes ago   /bin/sh -c #(nop) COPY file:ea99ab97871c0ac0…   1.6kB     
cc574bf57b00   41 minutes ago   /bin/sh -c #(nop) COPY file:e653fe5d05c600c5…   1.9kB     
48957ee51430   41 minutes ago   /bin/sh -c #(nop) COPY dir:4136511d2bbd0bbd0…   131MB     
534d995ec8e0   41 minutes ago   /bin/sh -c #(nop)  ENV ADMIN_JVM=               0B        
bd9f0138c4e7   41 minutes ago   /bin/sh -c #(nop)  ENV LOCAL_PATH=/opt/sheny…   0B        
ff709676b33c   41 minutes ago   /bin/sh -c apk --no-cache add procps            3.38MB    
35b0e5135df0   4 years ago      /bin/sh -c set -x  && apk add --no-cache   o…   78.1MB    
<missing>      4 years ago      /bin/sh -c #(nop)  ENV JAVA_ALPINE_VERSION=8…   0B        
<missing>      4 years ago      /bin/sh -c #(nop)  ENV JAVA_VERSION=8u212       0B        
<missing>      4 years ago      /bin/sh -c #(nop)  ENV PATH=/usr/local/sbin:…   0B        
<missing>      4 years ago      /bin/sh -c #(nop)  ENV JAVA_HOME=/usr/lib/jv…   0B        
<missing>      4 years ago      /bin/sh -c {   echo '#!/bin/sh';   echo 'set…   87B       
<missing>      4 years ago      /bin/sh -c #(nop)  ENV LANG=C.UTF-8             0B        
<missing>      4 years ago      /bin/sh -c #(nop)  CMD ["/bin/sh"]              0B        
<missing>      4 years ago      /bin/sh -c #(nop) ADD file:66f49017dd7ba2956…   5.29MB    

@TeslaCN TeslaCN marked this pull request as ready for review August 5, 2023 14:59
@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2023

Codecov Report

Merging #4962 (6485ff9) into master (defb046) will increase coverage by 0.02%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #4962      +/-   ##
============================================
+ Coverage     63.92%   63.94%   +0.02%     
  Complexity     8529     8529              
============================================
  Files          1208     1208              
  Lines         35899    35899              
  Branches       3217     3217              
============================================
+ Hits          22948    22956       +8     
+ Misses        11100    11091       -9     
- Partials       1851     1852       +1     

see 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@yu199195 yu199195 added the buid label Aug 7, 2023
@yu199195 yu199195 added this to the 2.6.0 milestone Aug 7, 2023
@yu199195 yu199195 merged commit 625441d into apache:master Aug 7, 2023
38 checks passed
@TeslaCN TeslaCN deleted the reduce-admin-docker-image-layer branch August 7, 2023 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants