Coder Social home page Coder Social logo

nyu-lab-docker's Introduction

nyu-lab-docker

Build Status

What is Docker? How can Docker containers help you build and deploy a cloud native solution as micro-services? This lab will teach you what-you-need-to-know to get started building and running Docker Containers in IBM Bluemix. It covers what Docker is, and more importantly, what Docker is not! You will learn how to deploy and run existing Docker community images, how to create your own Docker images and push them to Bluemix, and how to connect containers together using Docker Compose. If you want to know what all this fuss about containers is about, come to this lab and spin up a few containers and see for yourself why everyone is adopting Docker.

This lab is an example of how to create a Python / Flask / Redis app using Docker on Bluemix

Setting up your Development Environment

You must either install Docker and the Cloud Foundry CLI and IBM Container plug-in locally on your computer or use the Vagrant image that is included in this repo. We highly recommend just using Vegrant and VirtualBox.

We use Vagrant, VirtualBox, and Docker for virtualizing our development environment. Vagrant is technology that allows you to quickly provision and configure Linux virtual machines on your computer. VirtualBox is a hypervisor like VMware Fusion that hosts virtual machines. Docker is technology that will run multiple containers within a single Linux host machine. Together they make a powerful development environment that mimics multiple servers in a production environment.

To get started, download VirtualBox and Vagrant if you don't have them already:

Download VirtualBox - Used to host virtual machines locally on your workstation

Download Vagrant - Used to auto-provision VMs containing your complete dev environment

Install VirtualBox and then Vagrant. If you want to test with cURL you will need to have it installed on your laptop if your system doesn't already have it.

Vagrant Plugin needed!

You will need to install the following Vagrant plugin in order for file sharing to work properly:

vagrant plugin install vagrant-vbguest

That's it! VirtualBox will install Docker into the virtual machine so you don't have to.

Install using Vagrant and VirtualBox

git clone [email protected]:rofrano/nyu-lab-docker.git
cd nyu-lab-docker
vagrant up
vagrant ssh

Installing on Mac OS X or Windows�

Get Docker Toolbox from the Docker web site and install it: https://www.docker.com/docker-toolbox

Installing on Ubuntu Trusty 14.04 (LTS)�

sudo apt-get update
sudo apt-get install docker-engine

Installing on Other OS� See Docker installation guide: https://docs.docker.com/installation/

Cloud Foundry Installation for Ubuntu

wget -O cf-cli-installer_6.22.1_x86-64.deb 'https://cli.run.pivotal.io/stable?release=debian64&version=6.22.1&source=github-rel'
sudo dpkg -i cf-cli-installer_6.22.1_x86-64.deb
echo Y | cf install-plugin https://static-ice.ng.bluemix.net/ibm-containers-linux_x64

Enable auto-complete for docker

$vi /etc/bash.bashrc
Uncomment the following lines:
# enable bash completion in interactive shells
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi
$source /etc/bash.bashrc

Test it with docker +[tab], you can hit the [tab] after any command

nyu-lab-docker's People

Contributors

rofrano avatar

Watchers

James Cloos avatar Tamar Eilam avatar

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.