docker / machine

Machine management for a container-centric world
https://docs.docker.com/machine/
Apache License 2.0
6.62k stars 1.97k forks source link

Size of default machine increases every time I build an image #4533

Open HPNavjot opened 5 years ago

HPNavjot commented 5 years ago

Description: Every time I try to build the image using dockerfile, the size of the default machine increase. which is causing disk space issues. I remove the default image save it as tarball on my system even then the size of default image does not go down.

Any solution for this ?

Environment: Docker toolbox on windows server 2012

DockerFile content:

FROM openjdk:8-jre-alpine RUN apk add --update bash libstdc++ curl zip strace && rm -rf /var/cache/apk/*

RUN rm /bin/sh && ln -s /bin/bash /bin/sh

RUN curl -L https://bintray.com/artifact/download/groovy/maven/apache-groovy-binary-2.4.8.zip -o /tmp/groovy.zip && \ cd /usr/local && \ unzip /tmp/groovy.zip && \ rm /tmp/groovy.zip && \ ln -s /usr/local/groovy-2.4.8 groovy && \ /usr/local/groovy/bin/groovy -v && \ cd /usr/local/bin && \ ln -s /usr/local/groovy/bin/groovy groovy

HPNavjot commented 5 years ago

defaultimagesize

HPNavjot commented 5 years ago

I tried creating a default image with limited size of 1gb. It created the machine but was not able to build as it ran out of space even thouhj only 50mb was used. Command used to create the default machine docker-machine create default --virtualbox-disk-size "1024" --engine-env HTTP_PROXY=http://proxy.pr1.mu.com:8080 --engine-env HTTPS_PROXY=http://proxy.pr1.mu.com:8080 --engine-env NO_PROXY=localhost,127.0.0.1