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

Building/running gcr:deploy uses up 20GB #73

Closed
kchodorow opened this issue May 10, 2017 · 6 comments
Closed

Building/running gcr:deploy uses up 20GB #73

kchodorow opened this issue May 10, 2017 · 6 comments
Labels

Comments

@kchodorow
Copy link
Contributor

This is impractical.

$ df -h
...
/dev/dm-1                                                55G   54G     0 100% /
$ sudo du -sh /var/lib/docker
22G	/var/lib/docker

docker

(Disk usage of /, the red area is docker.)

@damienmg
Copy link
Contributor

Unfortunately unless we start using minimal distro instead of ubuntu we cannot reduce to much the size of the image...

@kchodorow
Copy link
Contributor Author

...do we have to use docker?

@damienmg
Copy link
Contributor

We can switch to the docker_push that @mattmoor had come with but for pull we are still depending on using apt-get install which requires docker. Ideally we would switch to use a dockerless version of it which would save several giga.

@damienmg
Copy link
Contributor

The three images we are building with docker are:

FROM ubuntu:wily
RUN apt-get update
RUN apt-get install -y zip g++ openjdk-8-jdk openjdk-8-source wget git unzip python python3 curl dpkg-dev
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
FROM ubuntu:wily
RUN apt-get update
RUN apt-get install -y zip g++ openjdk-8-jdk openjdk-8-source wget git unzip python python3 curl
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
RUN apt-get install -y golang make
RUN apt-get update
RUN apt-get install -y jekyll
RUN apt-get install -y reprepro
RUN apt-get install -y devscripts
FROM ubuntu:wily
RUN apt-get update
RUN apt-get install -y zip g++ openjdk-8-jdk openjdk-8-source wget git unzip python python3 curl
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
RUN apt-get install -y ssh

(see https://github.com/bazelbuild/continuous-integration/tree/master/base)

I am pretty sure we can make it back to have dockerless images, @mattmoor have probably more visibility about the existing images we can reuse (Java / Jekyll / SSH / g++ / python / python3 / go)

@damienmg damienmg added P4 and removed P3 labels Aug 21, 2017
@damienmg
Copy link
Contributor

damienmg commented Sep 6, 2017

So we only build 2 images now. Closing this one as we cannot do much more than switching to distroless in that respect.

@damienmg damienmg closed this as completed Sep 6, 2017
@mattmoor
Copy link
Contributor

mattmoor commented Sep 6, 2017

@damienmg You can still share the base portion of those images so you aren't paying for multiple copies.

e.g. put this in one Dockerfile:

FROM ubuntu:wily
RUN apt-get update
RUN apt-get install -y zip g++ openjdk-8-jdk openjdk-8-source wget git unzip python python3 curl
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64

Tag it "base", then make the others:

FROM base
...

Right now each of these images will produce redundant versions of these layers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants