From f6ae7f7cc10c694106c6fad717289ee6db138ec5 Mon Sep 17 00:00:00 2001 From: Matthieu B Date: Wed, 10 Aug 2016 10:11:05 +0900 Subject: [PATCH 1/5] Add dbus dependency when installing package dependencies --- dockerfiles/splash/provision.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dockerfiles/splash/provision.sh b/dockerfiles/splash/provision.sh index bdd04c8ae..f3fc504bd 100755 --- a/dockerfiles/splash/provision.sh +++ b/dockerfiles/splash/provision.sh @@ -72,7 +72,9 @@ install_deps () { libre2 \ libicu52 \ liblua5.2-0 \ - zlib1g + zlib1g \ + dbus + } install_builddeps () { From fe500ae2065424594175fb0f691db85c62e2c45c Mon Sep 17 00:00:00 2001 From: Matthieu B Date: Wed, 10 Aug 2016 10:16:30 +0900 Subject: [PATCH 2/5] Add entrypoint to generate the machine UUID on startup --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 1aee83eae..a4d743b5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,7 @@ VOLUME [ \ EXPOSE 8050 8051 5023 ENTRYPOINT [ \ + "dbus-uuidgen", ">", "/etc/machine-id" \ "python3", \ "/app/bin/splash", \ "--proxy-profiles-path", "/etc/splash/proxy-profiles", \ From adb64c3cd5eadfbbb13aa41a918cfe5c0db39552 Mon Sep 17 00:00:00 2001 From: Matthieu B Date: Wed, 10 Aug 2016 12:34:11 +0900 Subject: [PATCH 3/5] Add startup script as entrypoint for the container --- bin/startup.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 bin/startup.sh diff --git a/bin/startup.sh b/bin/startup.sh new file mode 100644 index 000000000..3a3526de5 --- /dev/null +++ b/bin/startup.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# Startup script for splash container . Suppress machine-id warning +# by generatin and UUID for the virtual machine + +# Generate machine UUI +/bin/dbus-uuidgen > /etc/machine-id + +# Run splash +python3 /app/bin/splash \ +--proxy-profiles-path /etc/splash/proxy-profiles \ +--js-profiles-path /etc/splash/js-profiles \ +--filters-path /etc/splash/filters \ +--lua-package-path /etc/splash/lua_modules/?.lua \ No newline at end of file From 742051f5c8c25ca401b5bdb8457e86fcef6c3205 Mon Sep 17 00:00:00 2001 From: Matthieu B Date: Wed, 10 Aug 2016 12:34:37 +0900 Subject: [PATCH 4/5] Add startup script file to the container and set it as entrypoint --- Dockerfile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index a4d743b5c..7fddca142 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,12 +31,9 @@ VOLUME [ \ EXPOSE 8050 8051 5023 -ENTRYPOINT [ \ - "dbus-uuidgen", ">", "/etc/machine-id" \ - "python3", \ - "/app/bin/splash", \ - "--proxy-profiles-path", "/etc/splash/proxy-profiles", \ - "--js-profiles-path", "/etc/splash/js-profiles", \ - "--filters-path", "/etc/splash/filters", \ - "--lua-package-path", "/etc/splash/lua_modules/?.lua" \ -] +# Copy start script +COPY bin/startup.sh /home/root/startup.sh +RUN chmod +x /home/root/startup.sh + +# Start up script (Generate machine UUID) +ENTRYPOINT ["/home/root/startup.sh"] \ No newline at end of file From f3e8b15dbbb4716fdf88fe2604b44707b9795f70 Mon Sep 17 00:00:00 2001 From: Matthieu B Date: Wed, 10 Aug 2016 12:38:54 +0900 Subject: [PATCH 5/5] Add new line at end of file --- Dockerfile | 2 +- bin/startup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7fddca142..906727929 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,4 +36,4 @@ COPY bin/startup.sh /home/root/startup.sh RUN chmod +x /home/root/startup.sh # Start up script (Generate machine UUID) -ENTRYPOINT ["/home/root/startup.sh"] \ No newline at end of file +ENTRYPOINT ["/home/root/startup.sh"] diff --git a/bin/startup.sh b/bin/startup.sh index 3a3526de5..7f41ce940 100644 --- a/bin/startup.sh +++ b/bin/startup.sh @@ -10,4 +10,4 @@ python3 /app/bin/splash \ --proxy-profiles-path /etc/splash/proxy-profiles \ --js-profiles-path /etc/splash/js-profiles \ --filters-path /etc/splash/filters \ ---lua-package-path /etc/splash/lua_modules/?.lua \ No newline at end of file +--lua-package-path /etc/splash/lua_modules/?.lua