Giter Site home page Giter Site logo

docker-vagrant's Introduction

docker-vagrant

Vagrant Development Environment for Kick-Starting Developing Docker Containers.

Ever wanted to try Docker and dind't know where to start?

This Vagrant setup will get you going with creating your very own [Docker] (https://www.docker.io/) container images. Included in the installation are two servers one running [Shipyard] (http://shipyard-project.com/) to visually manage your Docker Environment and the other setup as a [Docker] (https://www.docker.io/) Host including a [Private Docker Registry] (http://blog.docker.io/2013/07/how-to-use-your-own-registry/). Included in this Kickstart are two sample container images one base [Ubuntu] (http://www.ubuntu.com/) image and a simple [HAProxy] (http://haproxy.1wt.eu/) Image as a basis for getting started.

Prerequisites

You must have [Vagrant installed] (https://docs.vagrantup.com/v2/installation/) on you local host machine.

Quick Start

  1. Clone the repo: git clone git://github.com/cmoudy/docker-vagrant.git
  • Launch Shipyard machine using the command vagrant up shipyard.
  • Navigate to [Shipyard Server] (http://admin:[email protected]:8000) ensure it is up and running by logging in using default credentials admin/shipyard.
  • Launch Docker Host machine using the command vagrant up docker.
  • Once the Docker Host machine is up and running you will want to navigate to [Shipyard] (http://192.168.1.2:8000/hosts) Authorize the Host and set the ip of the Docker Host to 192.168.1.4 as it defaults to internal Vagrant IP on setup.

Mini-Docker Tutorial

  1. SSH into the Docker Host Machine: vagrant ssh docker
  • Switch to the ubuntu base image folder cd /vagrant/images/ubuntu-base
  • Build the base image with the following: sudo docker build -t ubuntu-base:1.0.0 .
  • Switch over to cd ../haproxy/ the included HAProxy example image and build it as well: sudo docker build -t haproxy:1.0.0 .
  • Start an HAProxy container using the newly created HAProxy Image: sudo docker run -i -t -p 9000:9000 haproxy:1.0.0
  • Navigate to your browser to view your [HAProxy] (http://haproxy:[email protected]:9000) instance is up and running using haproxy/haproxy.

Environment Details

* Shipyard Server IP = 192.168.1.2
* Docker Server IP = 192.168.1.4

Using local registry on docker server

This Environment includes a Docker Private registry hosted on the Docker Host Machine running under port 5000.

Example usages:

* Tag for local registry import `sudo docker tag ubuntu-base:1.0.0 docker.local:5000/ubuntu-base:1.0.0`

* Push to local registry <must tag first> `sudo docker push docker.local:5000/ubuntu-base`

docker-vagrant's People

Stargazers

Joseph Gimenez avatar  avatar Luís Rodrigues avatar

Watchers

 avatar

Forkers

armeo amanurat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.