docker镜像内容
FROM ubuntu:20.04RUN apt-get update && \DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y python3.9 python3-pip python3.9-devADD hello.py /CMD ["python3", "/hello.py"]
print("hello docker")
构建docker镜像命令
docker image build -t hello .
build —构建
t — docker镜像名字
. — 当前的文件下
上传docker镜像
docker logindocker image push heaode/hello:1.0
