GithubHelp home page GithubHelp logo

dockerizing-nodejs's Introduction

Dockerizing-Nodejs

Description

In this guide I'll build a Nodejs Hello World Web App using Docker for running the application. This guide will assume that you have already downloaded Docker and Node, if not, you can check the links to download them.

How to build

First of all we will make a new directory where all the files would live.

$~: cd desktop
$desktop: mkdir hello-world
$desktop: cd hello-world

The next step, we will clone this repository which contains all the files we need.

$hello-world: git clone https://github.com/jodeh/dockerizing-nodejs.git

Now we'll build the docker and check if the image was created.

$hello-world: docker build . -t <your username>/node-web-app
$hello-world: docker images

Last but not least we will run the image, we're going to map the port of 49160 to the port specified in the Dockerfile 8080. As well as we will run it in the detached mode which will run it in the background.

$hello-world: docker run -p 49160:8080 -d <your username>/node-web-app

Finally it's time for testing our work, you can basiclly go to your localhost with the port number we used 49160 or you can use this command.

$hello-world: curl 0.0.0.0:49160

dockerizing-nodejs's People

Contributors

jodeh avatar

Watchers

 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.