added dockerfile build process for www

This commit is contained in:
matt 2021-01-10 19:03:13 +00:00
parent d71734a206
commit 76f8d905f0
3 changed files with 32 additions and 3 deletions

View File

@ -1,6 +1,13 @@
REQIUREMENTS
Docker CE
# Build the www webpack
```
sudo docker build -t kasmweb/www -f builder/dockerfile.www.build .
sudo docker run -it --rm -v $PWD/builder/www:/build kasmweb/www:latest
```
# build the docker image
cd /src_code_root
sudo docker build -t kasmvncbuilder:18.04 -f builder/dockerfile.build .

19
builder/build_www.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# clear previous build
rm -rf /build/*
# build webpack
npm run build
# remove node stuff from directory
rm -rf node_modules/
# copy all to build dir
cp -R ./* /build/
# remove unneccesary files
cd /build
rm *.md
rm AUTHORS
rm *.yml
rm vnc.html
rm vnc_lite.html

View File

@ -1,7 +1,10 @@
FROM node:15-buster
FROM node:12-buster
COPY kasmweb/ /src/
COPY kasmweb/ /src/www/
COPY builder/build_www.sh /src/
WORKDIR /src
WORKDIR /src/www
RUN npm install
ENTRYPOINT [ "/src/build_www.sh" ]