Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

127
Views
How to run docker to other server machine

I have code

server.js

  'use strict';

   const express = require('express');

   // Constants
   const PORT = 8080;

   // App
   const app = express();
   app.get('/', function (req, res) {
      res.send('Hello world\n');
   });

  app.listen(PORT);
  console.log('Running on http://localhost:' + PORT);

dockerfile

 FROM node:6.5.0
 WORKDIR /app
 RUN npm install nodemon -g
 COPY package.json /app/package.json
 RUN npm install
 COPY server.js /app
 EXPOSE 8080

package.json

 {
  "name": "docker_web_app",
  "version": "1.0.0",
  "description": "Node.js on Docker",
  "author": "First Last <first.last@example.com>",
  "main": "server.js",
  "scripts": {
      "start": "node server.js"
   },
  "dependencies": {
      "express": "^4.13.3"
  }
}

I have Implemented dockerfile and docker image on local machine and then pushed on docker hub.

On other machine I pull docker image from docker hub and run docar command, It runs successfully and return console.log().

I want to see node module and project directory, but have not seen anywhere.

Please help me. How can show project directory on other machine.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Your files are inside the container you have created. You can execute a bash shell inside the container using docker exec -it container_name_or_id /bin/bash. Then, you will see your files in /app.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!