Skip to content
  • Home
  • Privacy Policy
  • Services
  • Testimonials
  • Who we are
  • Blog
  • Let’s Talk

Zuiver

  • Let’s Talk
  • Toggle search form

Hyperledger: How to build your own docker container for Node.js Web app (Ubuntu 16.04)

Posted on July 28, 2022July 28, 2022 By admin No Comments on Hyperledger: How to build your own docker container for Node.js Web app (Ubuntu 16.04)

Quite recently I had a situation to build my own docker container that should trigger my node.js server application , which I need to integrate with my Hyperledger Fabric Server.

I have attempted many steps, but finally ended up with this beautiful official documentation from NodeJS(Refer it as OFFICIAL in this article)

https://nodejs.org/en/docs/guides/nodejs-docker-webapp/

While you can build your docker container by following above article, but you may end up facing few issues. I would like to address those issue here.

Let’s get started..

Assumptions:

  1. You have your nodejs application setup & ready to build your containers
  2. You have some prior knowledge about how docker works?
  3. You should have your system ready with docker installed, If not follow this article to install the same ( https://docs.docker.com/install/linux/docker-ce/ubuntu/#supported-storage-drivers )

a) Setup Package.json as mentioned in OFFICIAL

b) Setup server.js as mentioned in OFFICIAL

c) Create Dockerfile as mentioned in OFFICIAL (Note, here you may make a mistake in setting up different PORT number from Server.JS and Dockerfile : Keep it same)

d) create .dockerignore file as mentioned in OFFICIAL

Build your image using this command , here node-web-app is user defined, you can name whatever you want.

docker build -t <your username>/node-web-app .

Finally run your docker using below

docker run --rm -i -t -p 49160:8080 <your username>/node-web-app

it should show up below results

Error you may hit :

  • curl: (7) Failed to connect to localhost port 49160: Connection refused

Thanks for taking time to read, comment if you face any issues.

Happy to help…

Tags:48m series morgan stanley blockchain, address on blockchain, advanced blockchain, advantages of blockchain, application of blockchain, argo blockchain ipo, argo blockchain share price chat, argo blockchain ticker, aura blockchain, azure blockchain september mayfoleyzdnet, best blockchain games, binance blockchain, bitcoin gambling blockchain irs trust dice, blockchain brawlers, blockchain co to je, blockchain explained simply, blockchain gala 5b nfts 2b 1b, blockchain gala games 5b nfts 2b, blockchain gala games nfts 2b 1b, blockchain games 5b nfts 2b 1b, blockchain in banking, blockchain insurance, blockchain interview questions, blockchain miners, blockchain oracle, blockchain rpg, blockchain software, blockchain software development, blockchain tech, blockchain technology in banking, blockchain technology uses, blockchain teknolojisi, blockchain vs cryptocurrency, cardano blockchain explorer, disadvantages of blockchain, dmg blockchain solutions, edc blockchain, elwood blockchain global equity index, gfs blockchain, hashgraph vs blockchain, how to become blockchain developer, htc pivots from blockchain to next, invesco global blockchain, is shutting down its azure blockchain, microsoft azure blockchain service, microsoft is down its azure blockchain, microsoft is shutting its azure blockchain, microsoft shutting down its azure blockchain, money man blockchain, near blockchain, paris blockchain week, permissioned blockchain, pwc ar blockchain experience game, que es una blockchain, report scientific riot blockchain 215m hive, samsung blockchain keystore, sec blockchain credit partners theverge, securitize 48m series morgan stanley blockchain, securitize series morgan stanley blockchain, valve bans blockchain on steam, valve blockchain games on steam

Post navigation

Previous Post: Blockchain Hyperledger Fabric — Errors & Solutions
Next Post: Hyperledger Fabric: How to Setup Application from Scratch using Nodejs Series— Part 2

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2022 Zuiver. Sources: Top Blockchain Companies-Top Blockchain development Tools-Top Blockchain Platforms

Powered by PressBook Grid Dark theme