1
0
mirror of https://github.com/fcwu/docker-ubuntu-vnc-desktop synced 2026-08-05 16:12:41 +02:00

Add separate docker file for linux 16.04

Enable dynamic path with environment variable which triggers node js build at container runtime
This commit is contained in:
Tobias Stein
2019-07-08 13:06:02 +02:00
parent b0ece0637c
commit 328e8f1aa1
5 changed files with 146 additions and 20 deletions
+5 -1
View File
@@ -1,7 +1,11 @@
import os, fnmatch
toFind = "/app"
toReplace = os.getenv("PREFIX_PATH", "/app")
toReplace = os.getenv("PREFIX_PATH")
if (toReplace is None):
print("No path given by environment variable.")
exit()
print("using path {0} ...".format(toReplace))
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
echo 'Building Node.js project...'
cd /src/web \
&& yarn \
&& npm run build
cp -R /src/web/dist/. /usr/local/lib/web/frontend/
echo 'Build finished.'
+9
View File
@@ -67,4 +67,13 @@ chmod +x "/usr/local/lib/web/frontend$PREFIX_PATH/static/websockify/run"
PASSWORD=
HTTP_PASSWORD=
# dynamic prefix path renaming
# if [ -n "$DYNAMIC_PREFIX_PATH" ]; then
# PREFIX_PATH="$DYNAMIC_PREFIX_PATH"
# echo "DYNAMIC_PREFIX_PATH: $PREFIX_PATH"
# python /etc/RenameURL.py
# /etc/install.sh
# cat /etc/nginx/sites-enabled/default
# fi
exec /bin/tini -- /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf