Skip to content

Commit

Permalink
[docker] simplify docker stuff.
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Wang <skygragon@gmail.com>
  • Loading branch information
skygragon committed Dec 27, 2017
1 parent 1d2ec1e commit 9924e4b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 23 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.git
.npm
.nyc_output
.DS_Store
coverage
node_modules
npm-debug.log*
tmp
*.log
*.swp
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:alpine
LABEL maintainer="skygragon@gmail.com"

WORKDIR /tmp/leetcode-cli
COPY . .
COPY bin/entrypoint /
RUN npm install && \
tar zcf /leetcode-cli.tar.gz . && \
rm -rf /tmp/leetcode-cli

WORKDIR /root
VOLUME ["/root"]
ENTRYPOINT ["/entrypoint"]
7 changes: 0 additions & 7 deletions bin/docker.build

This file was deleted.

2 changes: 1 addition & 1 deletion docker/entrypoint → bin/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ srcdir=/root/leetcode-cli
leetcode=$srcdir/bin/leetcode

if [ ! -f "$leetcode" ]; then
echo "Not found leetcode, install now ..."
echo "Unpacking leetcode-cli code ..."
mkdir -p $srcdir
tar zxf /leetcode-cli.tar.gz -C $srcdir
fi
Expand Down
15 changes: 0 additions & 15 deletions docker/Dockerfile

This file was deleted.

0 comments on commit 9924e4b

Please sign in to comment.