File tree 3 files changed +44
-2
lines changed
3 files changed +44
-2
lines changed Original file line number Diff line number Diff line change
1
+ #
2
+ # node-httpp packaging Dockerfile
3
+ #
4
+ # https://github.com/InstantWebP2P/node-httpp
5
+ # Copyright (c) 2020 Tom Zhou<[email protected] >
6
+
7
+ # Pull base image.
8
+ FROM ubuntu:18.04
9
+
10
+ # Install.
11
+
12
+ # Add files.
13
+ COPY * /appins/
14
+
15
+ # Set environment variables.
16
+ ENV HOME /root
17
+
18
+ # Define working directory.
19
+ WORKDIR /appins
20
+
21
+ # Define default command.
22
+ CMD ["./bin/node" ]
Original file line number Diff line number Diff line change 1
1
#
2
- # libuvpp building Dockerfile
2
+ # node-httpp building Dockerfile
3
3
#
4
- # https://github.com/InstantWebP2P/libuvpp
4
+ # https://github.com/InstantWebP2P/node-httpp
5
5
# Copyright (c) 2020 Tom Zhou<
[email protected] >
6
6
7
7
# Pull base image.
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # check docker image for building
4
+ if [ " $( docker images -q httpp:12.x 2> /dev/null) " == " " ]; then
5
+ echo " Build Docker image as httpp:12.x"
6
+ docker image build --compress -t httpp:12.x -f ./Dockerfile ./appins/
7
+ fi
8
+
9
+ # execute commands
10
+ if [ $# -ne 0 ]; then
11
+ echo " $@ ..."
12
+ docker run -v ` pwd` :` pwd` -w ` pwd` -i -t \
13
+ --rm --network host \
14
+ httpp:12.x $@
15
+ else
16
+ echo " Start Node.js REPL ..."
17
+ docker run -i -t \
18
+ --rm --network host \
19
+ httpp:12.x
20
+ fi
You can’t perform that action at this time.
0 commit comments