Add Metadata

Create Dockerfile

# Build from the Python 3.8 slim image
FROM python:3.8-slim

# Maintainer label
LABEL maintainer="[email protected]"

# Labels from
LABEL org.label-schema.description="A test container for"
LABEL org.label-schema.url=""

# Update packages
RUN apt-get update

Build Image From Dockerfile

Build the Dockerfile (docker build) in the current directory (.) and call the image chrisalbon/python-slim-3.8 (--tag chrisalbon/python-slim-3.8).

docker build --tag chrisalbon/python:updated .
Sending build context to Docker daemon  2.048kB
Step 1/6 : FROM python:3.8-slim
 ---> 07ea617545cd
Step 2/6 : LABEL maintainer="[email protected]"
 ---> Running in 09b74adcac2e
Removing intermediate container 09b74adcac2e
 ---> f6807f2e0ec7
Step 3/6 : LABEL"chrisalbon/python-slim-3.8"
 ---> Running in 30d8b408f432
Removing intermediate container 30d8b408f432
 ---> 06d9cd2e6c12
Step 4/6 : LABEL org.label-schema.description="A test container for"
 ---> Running in 3e65c2a4cb49
Removing intermediate container 3e65c2a4cb49
 ---> 671c0bcf63b4
Step 5/6 : LABEL org.label-schema.url=""
 ---> Running in c12017f760c0
Removing intermediate container c12017f760c0
 ---> 19e8a45c41c2
Step 6/6 : RUN apt-get update
 ---> Running in a9a53039186e
Get:1 buster InRelease [122 kB]
Get:2 buster/updates InRelease [65.4 kB]
Get:3 buster-updates InRelease [51.9 kB]
Get:4 buster/updates/main amd64 Packages [218 kB]
Get:5 buster/main amd64 Packages [7906 kB]
Get:6 buster-updates/main amd64 Packages [7868 B]
Fetched 8372 kB in 1s (6003 kB/s)
Reading package lists...
Removing intermediate container a9a53039186e
 ---> 1ac7fee0c377
Successfully built 1ac7fee0c377
Successfully tagged big-project:v2