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