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:
@@ -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))
|
||||
|
||||
|
||||
@@ -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.'
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user