2015年11月27日 星期五

Write a Dockerfile

build image : http://docs.docker.com/mac/step_four/
manager your images and publish: http://docs.docker.com/mac/step_six/


Create a Dockerfile

  • sample: https://github.com/Chehao/docker-practice/blob/master/mytomcatbuild/Dockerfile

Docker Build
  • $>  docker build -t docker-whale .command takes the Dockerfile in the current directory, and builds an image called docker-whale on your local machine.

Tag it
  • tag:
    docker tag fa8293e27eb1 [namespace]/docker-whale:latest
Pulish to Docker Hub:
  • docker login --username=yourhubusername --email=youremail@company.com
  • docker push [namespace]/docker-whale
Run it

  •  $> docker run  -e AAA=BBB docker-whale





沒有留言:

張貼留言