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

build(docker): slim Docker image #340

Closed
wants to merge 1 commit into from
Closed

build(docker): slim Docker image #340

wants to merge 1 commit into from

Conversation

yin1999
Copy link
Contributor

@yin1999 yin1999 commented Jul 31, 2022

Use scratch as runner to reduce the size of Docker image.

The size reduced by about 5 MB:

image

Comment on lines 16 to +17
ENV TZ=Asia/Shanghai
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tzdata to show Asia/Shanghai time by log

ENV TZ=Asia/Shanghai
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
Copy link
Contributor Author

Choose a reason for hiding this comment

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

used for ssl ca certificates identity

@jeessy2
Copy link
Owner

jeessy2 commented Jul 31, 2022

scratch不能进入容器里调试之类的了?能调试最好了,特别有些ipv6之类的,需要进入调试

@yin1999 yin1999 closed this Jul 31, 2022
@yin1999 yin1999 deleted the slim-img branch July 31, 2022 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants