Web: https://www.reddit.com/r/docker/comments/s3qabw/question_root_on_scratch_images/

Jan. 14, 2022, 11:33 a.m. | /u/nicoskaralis

Docker: An open source project to pack, ship and run any application as a lightweight container reddit.com

I'm moving our entire structure to docker containers. Right now I'm breaking a monolithic application into containerized smaller ones and is going all right. Right now I'm building a node based container and the end result is a very big image, like 1GB just from the node base container image.

This lead me to think about using scratch images.

  1. Use the node image as an intermediary build image
  2. Copy the files and binaries required to the scratch image
  3. Use the binary directly as entrypoint, like ['/bin/node', 'index.js']

I know the …

docker

Machine Learning Platform Engineer - Team Lead

@ Arctic Wolf Networks | Kitchener-Waterloo, Ontario, Canada or Toronto, Ontario, Canada

Staff Support Engineer - Terraform

@ HashiCorp | United States (Remote)

Cloud Security Engineer

@ Novetta | Arlington, VA

AWS Solutions Architect - FL

@ Amazon.com | US, FL, Virtual Location - Florida

DevOps Engineer, Cloud

@ Hyperscience | Germany

Cloud Infrastructure Architect, Professional Services, Federal Civilian focus

@ Amazon.com | US, MD, Virtual Location - Maryland