Merge pull request #49 from parkervcp/game/rust

Update the rust image
This commit is contained in:
Dane Everitt 2019-09-10 09:27:06 -07:00 committed by GitHub
commit 6a20d5394c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -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 \
&& apt upgrade -y \
&& apt install -y lib32gcc1 lib32stdc++6 unzip curl iproute2 libgdiplus \
&& curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt install -y nodejs \
&& apt install -y nodejs npm \
&& mkdir /node_modules \
&& npm install --prefix / ws \
&& useradd -d /home/container -m container

View File

@ -2,7 +2,9 @@
var startupCmd = "";
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);
for (var i = 0; i < args.length; i++) {
@ -57,7 +59,9 @@ var poll = function( ) {
if (json.Message !== undefined && json.Message.length > 0) {
console.log(json.Message);
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 {
console.log("Error: Invalid JSON received");