Coder Social home page Coder Social logo

docker_node_example's Introduction

Docker Node js Example

Slide

https://docs.google.com/presentation/d/1tCAR9Ql3cCule95E_jVGqaKaTGufnd5XJni-TC3rQZ4/edit?usp=sharing

Docker install

Windows https://docs.docker.com/docker-for-windows/install/

MacOS https://docs.docker.com/docker-for-mac/install/

Ubuntu https://docs.docker.com/engine/install/ubuntu/

ทดสอบว่า docker ใช้งานได้

  • $ docker version

หากสามารถใช้งานได้แล้ว จะแสดงversion ขึ้นมา

วิธีการใช้ (ไฟล์ตัวอย่าง)

SSH

HTTPS

ทดสอบการใช้งาน

Build Image

  • $ docker build . -t node-web-app

List images

  • $ docker images

Run image

  • $ docker run -p 49160:8080 -d node-web-app

หากต้องการเข้าไปใน container นั้นๆ

  • $ docker ps

Example

CONTAINER ID => d79d51d685ad
IMAGE => /node-web-app:latest

  • $ docker exec -it d79d51d685ad /bin/bash

การทดสอบว่าใช้งานได้

  • $ curl -i localhost:49160

Docs

Docker commands

Docker hub

Play with docker

docker_node_example's People

Contributors

newzpanuwat avatar

Watchers

 avatar  avatar  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.