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

interop: make Docker image smaller by using multi-stage builds #3881

Closed
thomaseizinger opened this issue May 5, 2023 · 0 comments · Fixed by #3926
Closed

interop: make Docker image smaller by using multi-stage builds #3881

thomaseizinger opened this issue May 5, 2023 · 0 comments · Fixed by #3926

Comments

@thomaseizinger
Copy link
Contributor

Talking about this one here: https://github.com/libp2p/rust-libp2p/blob/master/interop-tests/Dockerfile

The latest caching efforts over in https://github.com/libp2p/test-plans benefit from smaller images because we now skip downloading the inbetween layers.

Migrating this one to smaller images would benefit that.

The important thing about this change is that we should backport it to the older releases to ensure things actually get faster.

@mergify mergify bot closed this as completed in #3926 May 15, 2023
mergify bot pushed a commit that referenced this issue May 15, 2023
By using a multi-stage docker build, a distroless base image and a release build, we can get the size of the Rust interop test down to 50MB. Previously, the image would be around 500MB. A debug build image would still have ~400MB. The release build slows down our interop build step by about 1min 20s. That however is only because we don't currently seem to utilize the caches that from what I understand should work on self-hosted runners. I opted #3925 for that.

Resolves: #3881.

Pull-Request: #3926.
mergify bot pushed a commit that referenced this issue May 15, 2023
By using a multi-stage docker build, a distroless base image and a release build, we can get the size of the Rust interop test down to 50MB. Previously, the image would be around 500MB. A debug build image would still have ~400MB. The release build slows down our interop build step by about 1min 20s. That however is only because we don't currently seem to utilize the caches that from what I understand should work on self-hosted runners. I opted #3925 for that.

Resolves: #3881.

Pull-Request: #3926.
(cherry picked from commit 0bc724a)

# Conflicts:
#	interop-tests/Dockerfile
mergify bot pushed a commit that referenced this issue May 15, 2023
By using a multi-stage docker build, a distroless base image and a release build, we can get the size of the Rust interop test down to 50MB. Previously, the image would be around 500MB. A debug build image would still have ~400MB. The release build slows down our interop build step by about 1min 20s. That however is only because we don't currently seem to utilize the caches that from what I understand should work on self-hosted runners. I opted #3925 for that.

Resolves: #3881.

Pull-Request: #3926.
(cherry picked from commit 0bc724a)
mergify bot pushed a commit that referenced this issue May 15, 2023
By using a multi-stage docker build, a distroless base image and a release build, we can get the size of the Rust interop test down to 50MB. Previously, the image would be around 500MB. A debug build image would still have ~400MB. The release build slows down our interop build step by about 1min 20s. That however is only because we don't currently seem to utilize the caches that from what I understand should work on self-hosted runners. I opted #3925 for that.

Resolves: #3881.

Pull-Request: #3926.
(cherry picked from commit 0bc724a)
mergify bot pushed a commit that referenced this issue May 15, 2023
By using a multi-stage docker build, a distroless base image and a release build, we can get the size of the Rust interop test down to 50MB. Previously, the image would be around 500MB. A debug build image would still have ~400MB. The release build slows down our interop build step by about 1min 20s. That however is only because we don't currently seem to utilize the caches that from what I understand should work on self-hosted runners. I opted #3925 for that.

Resolves: #3881.

Pull-Request: #3926.
(cherry picked from commit 0bc724a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant