Add Dockerfile and update .dockerignore.

pull/1/head
Icedream 2017-08-19 23:01:36 +02:00
parent e0812afb56
commit fb523804ec
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
2 changed files with 47 additions and 6 deletions

View File

@ -1,11 +1,35 @@
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
# Deployed apps should consider commenting this line out:
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
node_modules
# Webpack output
/dist
###
.git*
Dockerfile
.dockerignore
docker-compose.yml
.git*
*.md

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM icedream/caddy
COPY . /src/
RUN \
(cd /src \
&& apk add --no-cache --virtual .build-deps \
nodejs-lts \
&& npm i \
&& NODE_ENV=production npm run build \
&& rm -rf /data \
&& mv dist /data \
&& apk del --no-cache .build-deps \
) \
&& rm -rf /src /tmp/* /var/tmp/*
WORKDIR /data
EXPOSE 2015