Dockerfile常用指令

Dockerfile常用指令

  • DockerFile指令

  • build命令
    1
    2
    3
    4
    5
    6
    7
    8
    Usage: docker image build [OPTIONS] PATH | URL | -
    Options:
    -t, --tag list # 镜像名称
    -f, --file string # 指定Dockerfile文件位置
    示例:
    docker build .
    docker build -t shykes/myapp .
    docker build -t shykes/myapp -f /path/Dockerfile /path