Skip to content

Optimize node images removing the content in /tmp folder #1326

Open
@navarroaxel

Description

@navarroaxel

Analyzing the docker layers of node:latest, node:slim and node:alpine images using dive

I found that the Yarn installation adds a /tmp/v8-compile-cache-0 with a size 2.2MiB in all these images and this is not needed for the users of theses images.

node:alpine
Screenshot_20200915_080820
node:slim
Screenshot_20200915_081850
node:latest
Screenshot_20200915_081412

Also, the /var/cache and /var/log folders sounds useless.

Let me know if I can help submitting a PR with

rm -rf /tmp/*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions