You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Grant Henke (Code Review)" <ge...@cloudera.org> on 2020/03/09 16:02:07 UTC

[kudu-CR] [docker] Reduce docker image size

Grant Henke has uploaded this change for review. ( http://gerrit.cloudera.org:8080/15389


Change subject: [docker] Reduce docker image size
......................................................................

[docker] Reduce docker image size

This patch reduces the Docker `kudu` image size by ~60 MB
(295MB -> 235MB).

It does this by moving the chown calls to before the files are
copied and using the `—chown` flag when copying files.
Before this change the chown command would effecively
double the size due to how aufs layers work.

I also removed some optional and unused packages from the
runtime and dev images.

Change-Id: I88238679912149d00ae3edc6a9d2d568f13aafca
---
M docker/Dockerfile
M docker/bootstrap-dev-env.sh
M docker/bootstrap-runtime-env.sh
3 files changed, 31 insertions(+), 22 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/89/15389/1
-- 
To view, visit http://gerrit.cloudera.org:8080/15389
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I88238679912149d00ae3edc6a9d2d568f13aafca
Gerrit-Change-Number: 15389
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] [docker] Reduce docker image size

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/15389 )

Change subject: [docker] Reduce docker image size
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/15389/1/docker/Dockerfile
File docker/Dockerfile:

http://gerrit.cloudera.org:8080/#/c/15389/1/docker/Dockerfile@288
PS1, Line 288:  && chown -R kudu:kudu ${DATA_DIR}
> drop?
This is still needed given the directory is created as root.


http://gerrit.cloudera.org:8080/#/c/15389/1/docker/Dockerfile@292
PS1, Line 292: COPY
> I'm curious whether the 'install' utility would be more appropriate in this
This is the docker COPY command not a standard utility and works more optimally with aufs. Using install wouldn't help in this case.



-- 
To view, visit http://gerrit.cloudera.org:8080/15389
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I88238679912149d00ae3edc6a9d2d568f13aafca
Gerrit-Change-Number: 15389
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 09 Mar 2020 18:17:44 +0000
Gerrit-HasComments: Yes

[kudu-CR] [docker] Reduce docker image size

Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/15389 )

Change subject: [docker] Reduce docker image size
......................................................................

[docker] Reduce docker image size

This patch reduces the Docker `kudu` image size by ~60 MB
(295MB -> 235MB).

It does this by moving the chown calls to before the files are
copied and using the `—chown` flag when copying files.
Before this change the chown command would effecively
double the size due to how aufs layers work.

I also removed some optional and unused packages from the
runtime and dev images.

Change-Id: I88238679912149d00ae3edc6a9d2d568f13aafca
Reviewed-on: http://gerrit.cloudera.org:8080/15389
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
---
M docker/Dockerfile
M docker/bootstrap-dev-env.sh
M docker/bootstrap-runtime-env.sh
3 files changed, 31 insertions(+), 22 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Alexey Serbin: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/15389
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I88238679912149d00ae3edc6a9d2d568f13aafca
Gerrit-Change-Number: 15389
Gerrit-PatchSet: 2
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] [docker] Reduce docker image size

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/15389 )

Change subject: [docker] Reduce docker image size
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/15389/1/docker/Dockerfile
File docker/Dockerfile:

http://gerrit.cloudera.org:8080/#/c/15389/1/docker/Dockerfile@288
PS1, Line 288:  && chown -R kudu:kudu ${DATA_DIR}
drop?


http://gerrit.cloudera.org:8080/#/c/15389/1/docker/Dockerfile@292
PS1, Line 292: COPY
I'm curious whether the 'install' utility would be more appropriate in this context (man install) if this went down to tweaking ownership of the files.



-- 
To view, visit http://gerrit.cloudera.org:8080/15389
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I88238679912149d00ae3edc6a9d2d568f13aafca
Gerrit-Change-Number: 15389
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 09 Mar 2020 17:59:51 +0000
Gerrit-HasComments: Yes

[kudu-CR] [docker] Reduce docker image size

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/15389 )

Change subject: [docker] Reduce docker image size
......................................................................


Patch Set 1: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/15389
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I88238679912149d00ae3edc6a9d2d568f13aafca
Gerrit-Change-Number: 15389
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 09 Mar 2020 18:31:24 +0000
Gerrit-HasComments: No