Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
# Spin up 5 nginx containers (each ~10 MB in memory) for i in $(seq 1 5); do docker run -d --name web$i \ --memory 32m --cpus 0.1 \ -p $((8079+i)):80 \ nginx:1.27-alpine done docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" docker stats --no-stream # Clean up all running containers docker stop $(docker ps -q) docker rm $(docker ps -aq) # Image size comparison docker pull ubuntu:24.04 docker pull alpine:3.20 docker pull node:20-slim docker pull node:20-alpine docker images --format "table {{.Repository}}:{{.Tag}}\t{{.Size}}" # ubuntu:24.04 ~78 MB # alpine:3.20 ~ 7 MB # node:20-slim ~90 MB # node:20-alpine ~55 MB
Result
Open