zoukankan      html  css  js  c++  java
  • 创建 Dockerfile

    1,创建一个简单的hello workd文件

     1 midke /root/hello-world
     2 cd /root/hello-world
     3 
     4 写一个helloworld脚本
     5 vim hello-world.py
     6 #!/usr/bin/env python
     7 print("hello world 
    ")
     8 
     9 vim Dockerfile
    10 FROM python
    11 ADD hello-world.py /
    12 CMD ["python3","hello-world.py"]
    13 
    14 生成images
    15 docker build -t python-obj/hello-world .
    16 
    17 查看生成的images
    18 docker image ls
    19 
    20 运行images
    21 docker run python-obj/hello-world 
  • 相关阅读:
    ARC 080
    CodeForces
    [Lydsy1806月赛] 路径统计
    AGC 022 C
    AGC 022 B
    AGC 020 B
    UVA
    AGC 018 A
    python
    python
  • 原文地址:https://www.cnblogs.com/YingLai/p/10960451.html
Copyright © 2011-2022 走看看