Skip to content

Unable to pull docker image lfaino/lorean:latest. Image is far too big #19

@eburgueno

Description

@eburgueno

Your Docker image seems to be huge. So big that I cannot pull if even when I have 120GiB available for my Docker daemon:

# docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 1.13.1
Storage Driver: devicemapper
 Pool Name: vg_docker-docker--pool
 Pool Blocksize: 524.3 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: 
 Metadata file: 
 Data Space Used: 19.92 MB
 Data Space Total: 119 GB
 Data Space Available: 119 GB
 Metadata Space Used: 16.89 MB
 Metadata Space Total: 302 MB
 Metadata Space Available: 285.1 MB
(...)

# docker pull lfaino/lorean
Using default tag: latest
Trying to pull repository hub.docker.com/lfaino/lorean ... 
Pulling repository hub.docker.com/lfaino/lorean
Trying to pull repository docker.io/lfaino/lorean ... 
Pulling from docker.io/lfaino/lorean
18d680d61657: Pulling fs layer 
0addb6fece63: Pulling fs layer 
78e58219b215: Pulling fs layer 
(...)
write /var/lib/docker/tmp/GetImageBlob243895328: no space left on device

I can add more space of course, but the reality is that your Dockerfile needs extensive optimisation. All of those RUN need to be squashed into a single one wherever possible, and use && instead.

Please have a look at the Best practices for writing Dockerfiles, particularly sections Minimize the number of layers and RUN sections.

As it stands, building the image is also not reproducible, so I cannot recommend it for use in production. You're COPYing artifacts into your published image that don't have a source declaratively defined anywhere:

COPY PASApipeline-v2.3.3.tar.gz ./
(...)
COPY Trinity-v2.5.1.tar.gz ./
(...)
COPY v3.0.1.tar.gz ./
(...etc)

Ideally these should be replaced with a wget from their source instead, just like you git clone some of the other dependencies.

I will send a PR with a some suggestions to better optimize the Dockerfile, but I cannot test it myself without access to those source files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions