commit
6a20d5394c
|
|
@ -1,12 +1,12 @@
|
||||||
FROM ubuntu:16.04
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
MAINTAINER Isaac A., <isaac@isaacs.site>
|
LABEL author="Isaac A." maintainer="isaac@isaacs.site"
|
||||||
|
|
||||||
RUN apt update \
|
RUN apt update \
|
||||||
&& apt upgrade -y \
|
&& apt upgrade -y \
|
||||||
&& apt install -y lib32gcc1 lib32stdc++6 unzip curl iproute2 libgdiplus \
|
&& apt install -y lib32gcc1 lib32stdc++6 unzip curl iproute2 libgdiplus \
|
||||||
&& curl -sL https://deb.nodesource.com/setup_6.x | bash - \
|
&& curl -sL https://deb.nodesource.com/setup_6.x | bash - \
|
||||||
&& apt install -y nodejs \
|
&& apt install -y nodejs npm \
|
||||||
&& mkdir /node_modules \
|
&& mkdir /node_modules \
|
||||||
&& npm install --prefix / ws \
|
&& npm install --prefix / ws \
|
||||||
&& useradd -d /home/container -m container
|
&& useradd -d /home/container -m container
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
var startupCmd = "";
|
var startupCmd = "";
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
fs.writeFile("latest.log", "");
|
fs.writeFile("latest.log", "", (err) => {
|
||||||
|
if (err) console.log("Callback error in appendFile:"+err);
|
||||||
|
});
|
||||||
|
|
||||||
var args = process.argv.splice(process.execArgv.length + 2);
|
var args = process.argv.splice(process.execArgv.length + 2);
|
||||||
for (var i = 0; i < args.length; i++) {
|
for (var i = 0; i < args.length; i++) {
|
||||||
|
|
@ -57,7 +59,9 @@ var poll = function( ) {
|
||||||
if (json.Message !== undefined && json.Message.length > 0) {
|
if (json.Message !== undefined && json.Message.length > 0) {
|
||||||
console.log(json.Message);
|
console.log(json.Message);
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
fs.appendFile("latest.log", "\n" + json.Message);
|
fs.appendFile("latest.log", "\n" + json.Message, (err) => {
|
||||||
|
if (err) console.log("Callback error in appendFile:"+err);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log("Error: Invalid JSON received");
|
console.log("Error: Invalid JSON received");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user