Skip to content

Commit 60b17aa

Browse files
committed
fixed docker files
1 parent 35984ee commit 60b17aa

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

Dockerfile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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"]

Dockerfile.bld

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
2-
# libuvpp building Dockerfile
2+
# node-httpp building Dockerfile
33
#
4-
# https://github.com/InstantWebP2P/libuvpp
4+
# https://github.com/InstantWebP2P/node-httpp
55
# Copyright (c) 2020 Tom Zhou<[email protected]>
66

77
# Pull base image.

appkg

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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

0 commit comments

Comments
 (0)