ASCI Logo
ASCI
Programs
Practice DSA
Degrees & Careers
Pricing
Log inGet Started

Quick Navigation & Search

Search curriculum tracks, DSA problems, systems theory and tools...

docker kubernetes-devops

Curriculum Index

Current LevelInitiate
0/ 500 XP
Gravit Certificate:
100% Required
  • 1.1 Multi-Stage Image Layer Optimization
•
1
2
3
4
5
6
7
8
9
10
Module 1: Docker Internals & Multi-Stage Builds•Lesson 1

1.1 Multi-Stage Image Layer Optimization

### Multi-Stage Dockerfiles
By compiling code in a heavy builder stage and copying only the binary into a scratch/distroless runner stage, image sizes shrink from 800MB to 15MB.
Python 3.11
•
Interactive Challenge
+70 XP
Challenge Objective

Calculate image size reduction percentage and print 'REDUCTION:97%'.

solution.py
UTF-84 SpacesAuto-saved
cpython3.11:~/workspace
CPython 3.11.8 (WASM)
$python3 -u solution.py
Click "Compile & Run" (or press Ctrl + Enter) to compile AST, verify bytecode, and execute the solution.