Skip to content

Commit e2a377f

Browse files
update node python
Signed-off-by: Arnav Gupta <arnav@codingblocks.com>
1 parent c461ac9 commit e2a377f

File tree

12 files changed

+49
-7
lines changed

12 files changed

+49
-7
lines changed

containers/nodejs6/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM alpine:3.6
22

3-
RUN apk add --no-cache nodejs bash
3+
RUN apk add --no-cache nodejs=6.10.3-r1 bash
4+
COPY ./compile.sh /bin/compile.sh
45
COPY ./run.sh /bin/run.sh
5-
RUN chmod 777 /bin/run.sh
6+
RUN chmod 777 /bin/compile.sh; \
7+
chmod 777 /bin/run.sh

containers/nodejs6/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22

3-
node script.js 1> run.stdout 2> run.stderr
3+
node script.js < run.stdin 1> run.stdout 2> run.stderr

containers/nodejs8/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM alpine:3.7
2+
3+
RUN apk add --no-cache nodejs=8.9.3-r0 bash
4+
COPY ./compile.sh /bin/compile.sh
5+
COPY ./run.sh /bin/run.sh
6+
RUN chmod 777 /bin/compile.sh; \
7+
chmod 777 /bin/run.sh

containers/nodejs8/compile.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#!/usr/bin/env bash

containers/nodejs8/run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
node script.js < run.stdin 1> run.stdout 2> run.stderr

tests/nodejs6/run.stdin

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
World

tests/nodejs6/runbox/run.stdin

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
World

tests/nodejs6/runbox/run.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Hello World!
1+
Hello World

tests/nodejs6/runbox/script.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
console.log("Hello World!")
1+
var readline = require('readline');
2+
3+
var rl = readline.createInterface({
4+
input: process.stdin,
5+
output: process.stdout,
6+
terminal: false
7+
});
8+
9+
rl.on('line', function (line) {
10+
console.log("Hello " + line);
11+
});

tests/nodejs6/script.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
console.log("Hello World!")
1+
var readline = require('readline');
2+
3+
var rl = readline.createInterface({
4+
input: process.stdin,
5+
output: process.stdout,
6+
terminal: false
7+
});
8+
9+
rl.on('line', function (line) {
10+
console.log("Hello " + line);
11+
});

0 commit comments

Comments
 (0)