Add Dockerfile to build

master 1.0.0
blallo 2020-03-12 21:13:08 +01:00
parent 6255f9f41b
commit 181495d07f
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F
3 changed files with 29 additions and 0 deletions

1
.dockerignore 100644
View File

@ -0,0 +1 @@
Dockerfile

11
Dockerfile 100644
View File

@ -0,0 +1,11 @@
FROM node:13
ENV VERSION=no_version
RUN mkdir /src \
&& chown node:node /src
ADD --chown=node:node . /src
WORKDIR /src
USER node
ENTRYPOINT ["/src/build.sh"]

17
build.sh 100755
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -x
if [ ! -d $PWD/scss/srht ]; then
git submodule update --init
fi
if [ ! -d $PWD/scss/srht/srht/scss/bootstrap ]; then
cd scss/srht
git submodule update --init
cd ../..
fi
npm install
npm run build:production
tar czvf dist/receptor-${VERSION}.tar.gz dist/*