TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Member-only story

Using multi-stage builds to make your docker image 10x smaller

Mike Huls
TDS Archive
Published in
6 min readFeb 18, 2022

--

If you’re done building you need to clean up your tools (image by Cesar Carlevarino Aragon on unsplash)

Before we start

Setup

1. A normal build

FROM ubuntu:20.04# BUNDLE LAYERS
RUN apt-get update -y && apt install -y --no-install-recommends \
curl \
osmium-tool \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /osmfiles \
&& mkdir /merged \
&& curl https://download.geofabrik.de/europe/monaco-latest.osm.pbf -o /osmfiles/monaco.osm.pbf \
&& curl…

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Mike Huls
Mike Huls

Written by Mike Huls

I write about interesting programming-related things: techniques, system architecture, software design and how to apply them in the best way. — mikehuls.com

No responses yet