I have 3 simple docker files. In every file I install python3 on the
base image centos:7, oraclelinux:7-slim and alpine:latest
.
The python3 installation process indicates the installed files (python3 and dependencies) are about 50MB. But when I build the new images, the centos image grows from 204MB to 413MB, the oraclelinux image grows from 132MB to 480MB and alpine grows from 5.59MB to 54MB. So, only new alpine image make sense as it grows almost 50MB. But why are new centos and oraclelinux images so larger than they should be?
Dockerfile for centos:
FROM centos:7
RUN yum install -y python3
Dockerfile for oraclelinux:
FROM oraclelinux:7-slim
RUN yum install -y python3
Dockerfile for alpine:
FROM alpine:latest
RUN apk add python3