Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

130
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda