Giter VIP home page Giter VIP logo

cnc-docker's Introduction

Deploy Application using Docker with Nginx

Docker Deep Dive Book PDF

Docker Tutorial

https://www.youtube.com/playlist?list=PLRnB5kp_ilgbsl8hJwhQXmSos8Ua9Tc_d


https://github.com/Ameen-Alam/CNC-Docker.git Clone the sample app from GitHub.

$ git clone https://github.com/Ameen-Alam/CNC-Docker.git

The clone operation creates a new directory called CNC-Docker . Change directory into CNC-Docker and list its contents.

$ cd CNC-Docker

Available Multiple Image Directories (001-static --to-- 010-mongoDB)

$ cd 001-static

two way to run a container

  • The Ops perspective
  • The Dev perspective

Start The Ops Perspective

If you are working from a freshly installed Docker host it will have no images and will look like the output above. Getting images onto your Docker host is called “pulling”. If you are following along with Linux, pull the ameenalam/nodeapp:latest.

To pull an image

docker pull <image_name>:<tag>

$ docker image pull ameenalam/nodeapp:latest

Docker images list

$ docker image ls

Run Container

docker run -d --name <container_name> -p <host_port>:<container_port> <image_name>:<tag>

$ docker container run -d --name=web2 -p=7000:8080 ameenalam/nodeapp:latest

For Test

$ curl http://localhost:7000

Open a web browser and navigate to the DNS name or IP address of the host that you are running the container from and point it to port 7000. You will see the following web page.

http://localhost:7000/


Push images to Docker Cloud

Docker Cloud uses Docker Hub as its native registry for storing both public and private repositories. Once you push your images to Docker Hub, they are available in Docker Cloud.

In order to get you started, let us get you a Docker ID.

https://hub.docker.com/

Docker login

Log in to Docker Cloud using the docker login command.

$ docker login

Tag Image

Tag your image using docker tag.

$ docker tag image_name username/image_name

Push your image to Docker Hub

Push your image to Docker Hub using docker push (making the same replacements as in the previous step).

$ docker push username/image_name

Check that the image you just pushed appears in Docker Cloud. Go to Docker Cloud and navigate to the Repositories tab and confirm that your image appears in this list.

cnc-docker's People

Contributors

ameen-alam avatar

Stargazers

ali hassan abbasi avatar

Watchers

James Cloos avatar ali hassan abbasi 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.