smengcl opened a new pull request #13:
URL: https://github.com/apache/ozone-docker-runner/pull/13
## What changes were proposed in this pull request?
- Bump rocksdb ldb to 7.0.3
- Bump gcc/g++ from 4 to 10 as rocksdb 7.x now requires gdb >= 7 to be
compiled
- I tried to bump g++ to 11 but CentOS 7 repo, for whatever reason,
doesn't have one packaged for arm64 right now. g++ 10 also works fine as I
tested.
- https://pkgs.org/download/devtoolset-10-gcc-c++
- https://pkgs.org/download/devtoolset-11-gcc-c++
- Bump golang from 1.17.7 to 1.17.8
- 1.18.0 has some issues when compiling `goofys` from source in arm64 env.
- And changed to alpine image from buster to save ~100 MB download.
Doesn't affect anything as I tested.
- Perform `yum clean all` during image build, especially in the last stage.
This step alone saves ~200 MB in final image size (on disk, uncompressed?)
- Clean up pip cache
- Use `COPY --chmod`. This saves ~15 MB of avoiding duplicating `goofys`
binary in the new overlayfs layer.
- Ref: https://blog.vamc19.dev/posts/dockerfile-copy-chmod/
- Note: `COPY --chmod` requires BuildKit. Use `DOCKER_BUILDKIT=1 docker
build -t apache/ozone-runner:dev .` to build the image, or enable BuildKit by
default. See
https://docs.docker.com/develop/develop-images/build_enhancements/#to-enable-buildkit-builds
Before (current master):
```bash
$ docker images apache/ozone-runner
REPOSITORY TAG IMAGE ID CREATED SIZE
apache/ozone-runner dev fda5b1ea9314 9 minutes ago 1.12GB
```
After:
```bash
$ docker images apache/ozone-runner
REPOSITORY TAG IMAGE ID CREATED SIZE
apache/ozone-runner dev ed4a6ffb4111 58 seconds ago 921MB
```
To build multi-arch image, use:
```bash
docker buildx build --platform linux/amd64,linux/arm64 -t
apache/ozone-runner:dev . --progress=plain
```
This should work on amd64 machines as well due to the (automatic) use of
qemu.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6524
## How was this patch tested?
- [x] Build and run on amd64 (Intel). Pass all existing acceptance test
suites.
- [ ] Build and run on arm64 (M1). Pass all existing acceptance test suites.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]