Skip to content

Instantly share code, notes, and snippets.

@richardsonlima
Last active January 25, 2016 21:43
Show Gist options
  • Save richardsonlima/b620e9d3cca0719e1406 to your computer and use it in GitHub Desktop.
Save richardsonlima/b620e9d3cca0719e1406 to your computer and use it in GitHub Desktop.
- Using Dockerfiles to Automate Building
- Building your Centos7.2 image
$ mkdir Docker_Env && cd Docker_Env && mkdir Centos7.2 && cd Centos7.2
$ wget https://gist.github.com/richardsonlima/6125b332ae68d97899b6 && mv mv 6125b332ae68d97899b6 Dockerfile
$ wget https://github.com/CentOS/sig-cloud-instance-images/blob/a3c59bd4e98a7f9c063d993955c8ec19c5b1ceff/docker/centos-7.2.1511-docker.tar.xz .
$ sudo docker build -t centos72:Centos72-mybuild01 .
- List your image
$ sudo docker images| grep Centos72-mybuild01
- Running your instance
$ sudo docker run -name my_centos72_instance-001 -i -t my_centos72
$ sudo docker run -i -t $id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment