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

slim docker images #3530

Closed
wants to merge 1 commit into from
Closed

slim docker images #3530

wants to merge 1 commit into from

Conversation

finchcn
Copy link

@finchcn finchcn commented Feb 3, 2021

What's the purpose of this PR

压缩docker镜像大小

Which issue(s) this PR fixes:

Fixes #3527

Brief changelog

压缩docker镜像大小

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Read the Contributing Guide before making this pull request.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit tests to verify the code.
  • Run mvn clean test to make sure this pull request doesn't break anything.

@codecov-io
Copy link

Codecov Report

Merging #3530 (fc2e8bd) into master (9cc32f7) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3530      +/-   ##
============================================
+ Coverage     51.32%   51.36%   +0.03%     
- Complexity     2315     2318       +3     
============================================
  Files           442      442              
  Lines         13843    13843              
  Branches       1408     1408              
============================================
+ Hits           7105     7110       +5     
+ Misses         6248     6246       -2     
+ Partials        490      487       -3     
Impacted Files Coverage Δ Complexity Δ
.../apollo/internals/RemoteConfigLongPollService.java 78.31% <0.00%> (+1.20%) 29.00% <0.00%> (+1.00%)
.../framework/apollo/spring/property/SpringValue.java 89.47% <0.00%> (+1.75%) 21.00% <0.00%> (+1.00%)
...rk/apollo/spring/property/SpringValueRegistry.java 88.88% <0.00%> (+5.55%) 11.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b728d42...fc2e8bd. Read the comment docs.

Copy link
Member

@nobodyiam nobodyiam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't work in my environment..

mvn docker:build -pl apollo-adminservice

[INFO] Scanning for projects...
[INFO]
[INFO] -----------< com.ctrip.framework.apollo:apollo-adminservice >-----------
[INFO] Building Apollo AdminService 1.8.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- docker-maven-plugin:1.2.2:build (default-cli) @ apollo-adminservice ---
[INFO] Using authentication suppliers: [ConfigFileRegistryAuthSupplier, FixedRegistryAuthSupplier]
[INFO] Copying /Users/jason/git/mine/apollo/apollo-adminservice/target/apollo-adminservice-1.8.0-SNAPSHOT-github.zip -> /Users/jason/git/mine/apollo/apollo-adminservice/target/docker/apollo-adminservice-1.8.0-SNAPSHOT-github.zip
[INFO] Copying /Users/jason/git/mine/apollo/apollo-adminservice/src/main/docker/Dockerfile -> /Users/jason/git/mine/apollo/apollo-adminservice/target/docker/Dockerfile
[INFO] Building image apolloconfig/apollo-adminservice
[WARNING]: Empty continuation line found in:
    RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories     && echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories     && apk update upgrade     && apk add --no-cache unzip ARG VERSION
[WARNING]: Empty continuation lines will become errors in a future release.

Step 1/14 : FROM openjdk:8-jre-alpine

 ---> f7a292bbb70c
Step 2/14 : LABEL maintainer="[email protected];ameizi<[email protected]>"

 ---> Using cache
 ---> 9414208b4f9a
Step 3/14 : RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories     && echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories     && apk update upgrade     && apk add --no-cache unzip ARG VERSION

 ---> Running in ca5cc9b2bf1a
fetch http://mirrors.aliyun.com/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://mirrors.aliyun.com/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
v3.8.5-65-g097f0358a9 [http://mirrors.aliyun.com/alpine/v3.8/main]
v3.8.5-37-gf06ffe835a [http://mirrors.aliyun.com/alpine/v3.8/community]
OK: 9616 distinct packages available
fetch http://mirrors.aliyun.com/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://mirrors.aliyun.com/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:

  ARG (missing):
    required by: world[ARG]
  VERSION (missing):
    required by: world[VERSION]

RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories \
&& apk update upgrade \
&& apk add --no-cache unzip \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to remove the trailer \?

Suggested change
&& apk add --no-cache unzip \
&& apk add --no-cache unzip

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, please also help to fix the conflicts.

image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a little problem when trying to fix the conflicts. I refork the repository, and resoved the conflicts, but there is no push notification.
The status in tab of "File Changed" is OK.
Need I create a new PR?

Copy link
Member

@nobodyiam nobodyiam Feb 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there is something wrong during the conflict resolving process, it's ok to create a new pr.

This was referenced Feb 24, 2021
@finchcn
Copy link
Author

finchcn commented Feb 26, 2021

recreate PR #3572

@finchcn finchcn closed this Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

建议压缩docker镜像大小
4 participants