Demo containers

parent 4e436a95
FROM httpd:2.4
COPY ./public/ /usr/local/apache2/htdocs/
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>HW!</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
\ No newline at end of file
FROM node:4.6
WORKDIR /app
COPY ./public/ /app
RUN npm install
EXPOSE 3000
CMD npm start
\ No newline at end of file
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('Hello World!');
});
var server = app.listen(3000, function () {
var host = server.address().address;
var port = server.address().port;
console.log('Programa de ejemplo escuchando en http://%s:%s',host,port);
});
\ No newline at end of file
{
"name": "myapp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node index.js"
},
"engines": {
"node": "^4.6.2"
},
"dependencies": {
"express": "^4.17.1"
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment