diff --git a/.docker/build b/.docker/build index 732c4c4d..067b09a1 100755 --- a/.docker/build +++ b/.docker/build @@ -40,62 +40,67 @@ build_gst() { done' } -build_dev() { - set -eux; \ - sudo docker build -f files/dev/Dockerfile -t nurdism/neko:dev $DIR ; \ - sudo docker push nurdism/neko:dev; -} - -build_deps() { - set -eux; \ - sudo docker build -f files/deps/Dockerfile -t nurdism/neko:deps $DIR ; \ - sudo docker push nurdism/neko:deps; -} - build_base() { set -eux; \ cd $DIR/server; go get -v -t -d . ; ./build; \ cd $DIR/client; npm install; npm run build; \ - cd $DIR; sudo docker build -f .docker/files/base/Dockerfile -t nurdism/neko:base $DIR ; + cd $DIR; sudo docker build -f .docker/files/base/Dockerfile -t nurdism/neko:base . ; } -build_firefox() { +build_latest() { set -eux; \ - sudo docker build -f files/firefox/Dockerfile -t nurdism/neko:firefox -t nurdism/neko:latest $DIR ; + cd $DIR; sudo docker build -f .docker/files/$1/Dockerfile -t nurdism/neko:latest . ; } -build_chromium() { +build_image() { set -eux; \ - sudo docker build -f files/chromium/Dockerfile -t nurdism/neko:chromium $DIR ; + cd $DIR; sudo docker build -f .docker/files/$1/Dockerfile -t nurdism/neko:$1 . ; } -build_docker() { +build() { if [ ! -d /gst/local ]; then build_gst fi - set -eux; \ - build_base; \ - build_firefox; \ - build_chromium; \ - sudo docker images nurdism/neko + if [ $1 != "" ]; then + build_image $1 + else + set -eux; \ + build_image "deps"; \ + build_image "base"; \ + build_base; \ + build_image "openbox"; \ + build_image "xfce4"; \ + build_image "jwm"; \ + build_image "firefox"; \ + build_image "chromium"; + fi + + sudo docker images nurdism/neko } -build_push() { - sudo docker push nurdism/neko:base - sudo docker push nurdism/neko:latest - sudo docker push nurdism/neko:firefox - sudo docker push nurdism/neko:chromium +push() { + if [ $1 != "" ]; then + sudo docker push nurdism/neko:$1 + else + sudo docker push nurdism/neko:deps + sudo docker push nurdism/neko:base + sudo docker push nurdism/neko:openbox + sudo docker push nurdism/neko:xfce4 + sudo docker push nurdism/neko:jwm + sudo docker push nurdism/neko:firefox + sudo docker push nurdism/neko:chromium + fi } -set -ex - case $1 in - push) build_push ;; - docker) build_docker ;; - base) build_base ;; - deps) build_deps ;; - dev) build_dev ;; + images) build;; + image) build $2 ;; + push) push $2 ;; + latest) build_latest ;; + base) build_image "base" ;; + deps) build_image "deps" ;; + dev) build_image "dev" ;; gst) build_gst ;; *) build_docker ;; esac diff --git a/.docker/files/base/Dockerfile b/.docker/files/base/Dockerfile index 0eb51c91..4342880f 100644 --- a/.docker/files/base/Dockerfile +++ b/.docker/files/base/Dockerfile @@ -11,7 +11,7 @@ ARG USER_GID=$USER_UID # # install neko dependencies RUN set -eux; apt-get update; \ - apt-get install -y --no-install-recommends wget ca-certificates; \ + apt-get install -y --no-install-recommends wget ca-certificates supervisor; \ # # create a non-root user groupadd --gid $USER_GID $USERNAME; \ @@ -45,12 +45,9 @@ ENV NEKO_BIND=:8080 # # neko config -COPY .docker/files/dbus /usr/bin/dbus -COPY .docker/files/openbox.xml /etc/neko/openbox.xml -COPY .docker/files/supervisord.conf /etc/neko/supervisord.conf -COPY .docker/files/xorg.conf /etc/neko/xorg.conf -COPY .docker/files/default.pa /etc/pulse/default.pa -COPY .docker/files/neko/supervisord.conf /etc/neko/supervisord/neko.conf +COPY .docker/files/base/supervisord.conf /etc/neko/supervisord.conf +COPY .docker/files/base/xorg.conf /etc/neko/xorg.conf +COPY .docker/files/base/neko.conf /etc/neko/supervisord/neko.conf # # neko dist diff --git a/.docker/files/neko/supervisord.conf b/.docker/files/base/neko.conf similarity index 71% rename from .docker/files/neko/supervisord.conf rename to .docker/files/base/neko.conf index 84e418a7..e51a15ba 100644 --- a/.docker/files/neko/supervisord.conf +++ b/.docker/files/base/neko.conf @@ -8,7 +8,4 @@ user=%(ENV_USER)s stdout_logfile=/var/log/neko/neko.log stdout_logfile_maxbytes=100MB stdout_logfile_backups=10 -redirect_stderr=true -stderr_logfile=/var/log/neko/neko.err.log -stderr_logfile_maxbytes=100MB -stderr_logfile_backups=10 \ No newline at end of file +redirect_stderr=true \ No newline at end of file diff --git a/.docker/files/supervisord.conf b/.docker/files/base/supervisord.conf similarity index 74% rename from .docker/files/supervisord.conf rename to .docker/files/base/supervisord.conf index b132c556..d33de54e 100644 --- a/.docker/files/supervisord.conf +++ b/.docker/files/base/supervisord.conf @@ -39,15 +39,4 @@ user=%(ENV_USER)s stdout_logfile=/var/log/neko/pulseaudio.log stdout_logfile_maxbytes=100MB stdout_logfile_backups=10 -redirect_stderr=true - -[program:openbox] -environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" -command=/usr/bin/openbox --config-file /etc/neko/openbox.xml -autorestart=true -priority=300 -user=%(ENV_USER)s -stdout_logfile=/var/log/neko/openbox.log -stdout_logfile_maxbytes=100MB -stdout_logfile_backups=10 -redirect_stderr=true +redirect_stderr=true \ No newline at end of file diff --git a/.docker/files/xorg.conf b/.docker/files/base/xorg.conf similarity index 100% rename from .docker/files/xorg.conf rename to .docker/files/base/xorg.conf diff --git a/.docker/files/brave/.gitkeep b/.docker/files/brave/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/.docker/files/chromium/Dockerfile b/.docker/files/chromium/Dockerfile index f2cc3025..5b42c07b 100644 --- a/.docker/files/chromium/Dockerfile +++ b/.docker/files/chromium/Dockerfile @@ -1,4 +1,4 @@ -FROM nurdism/neko:base +FROM nurdism/neko:openbox # # install neko chromium @@ -21,4 +21,5 @@ RUN set -eux; apt-get update; \ # copy configuation files COPY .docker/files/chromium/supervisord.conf /etc/neko/supervisord/chromium.conf COPY .docker/files/chromium/preferences.json /usr/share/chromium/master_preferences -COPY .docker/files/chromium/policies.json /etc/chromium/policies/managed/policies.json \ No newline at end of file +COPY .docker/files/chromium/policies.json /etc/chromium/policies/managed/policies.json +COPY .docker/files/chromium/openbox.xml /etc/neko/openbox.xml \ No newline at end of file diff --git a/.docker/files/openbox.xml b/.docker/files/chromium/openbox.xml similarity index 99% rename from .docker/files/openbox.xml rename to .docker/files/chromium/openbox.xml index ec8ec927..f79f3a3c 100644 --- a/.docker/files/openbox.xml +++ b/.docker/files/chromium/openbox.xml @@ -13,12 +13,6 @@ - - no - true - yes - normal - no true @@ -144,7 +138,7 @@ use obconf if you want to change these without having to log out and back in --> - 4 + 1 1 + + + + + 10 + 20 + + + + + + no + true + yes + normal + + + + + yes + + no + + yes + + no + + 200 + + no + + + + + Smart + +
yes
+ + Primary + + 1 + +
+ + + Clearlooks + NLIMC + + yes + yes + + sans + 8 + + bold + + normal + + + + sans + 8 + + bold + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + bold + + normal + + + + sans + 9 + + bold + + normal + + + + + + + 1 + 1 + + + + 875 + + + + + yes + Nonpixel + + Center + + + + + 10 + + 10 + + + + + + + 0 + 0 + 0 + 0 + + + + TopLeft + + 0 + 0 + no + Above + + Vertical + + no + 300 + + 300 + + Middle + + + + + C-g + + + + leftno + + + rightno + + + upno + + + downno + + + leftno + + + rightno + + + upno + + + downno + + + 1 + + + 2 + + + 3 + + + 4 + + + + + + + + + + + + + + + + + + + + scrot -s + + + + + + + + + + + + + + + + + + + + + + + + yesyes + + + + + + + + + + + + right + + + + + left + + + + + up + + + + + down + + + + + + + + true + Konqueror + + kfmclient openProfile filemanagement + + + + + scrot + + + + + 1 + + 500 + + 400 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + previous + + + next + + + previous + + + next + + + previous + + + next + + + + + + + + + + + + + + no + + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + + + + + top + + + + + + left + + + + + + right + + + + + + bottom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vertical + + + horizontal + + + + + + + + + + + + + + + + + previous + + + next + + + + previous + + + next + + + previous + + + next + + + + + + + + + + + + + + + + + + + + previous + + + next + + + previous + + + next + + + + + + + + + + + menu.xml + 200 + + no + + 100 + + 400 + + yes + + yes + + + + + + + +
diff --git a/.docker/files/firefox/supervisord.conf b/.docker/files/firefox/supervisord.conf index 312ef888..8eb9dccd 100644 --- a/.docker/files/firefox/supervisord.conf +++ b/.docker/files/firefox/supervisord.conf @@ -8,7 +8,4 @@ user=%(ENV_USER)s stdout_logfile=/var/log/neko/firefox-esr.log stdout_logfile_maxbytes=100MB stdout_logfile_backups=10 -redirect_stderr=true -stderr_logfile=/var/log/neko/firefox-esr.err.log -stderr_logfile_maxbytes=100MB -stderr_logfile_backups=10 \ No newline at end of file +redirect_stderr=true \ No newline at end of file diff --git a/.docker/files/jwm/Dockerfile b/.docker/files/jwm/Dockerfile new file mode 100644 index 00000000..7a7ab59e --- /dev/null +++ b/.docker/files/jwm/Dockerfile @@ -0,0 +1,11 @@ +FROM nurdism/neko:base + +# +# install jwm +RUN set -eux; apt-get update; \ + apt-get install -y --no-install-recommends jwm; + +# +# copy jwm conf and supervisord conf +COPY .docker/files/jwm/supervisord.conf /etc/neko/supervisord/jwm.conf +COPY .docker/files/jwm/conf.xml /etc/neko/jwm.xml diff --git a/.docker/files/jwm.xml b/.docker/files/jwm/conf.xml similarity index 100% rename from .docker/files/jwm.xml rename to .docker/files/jwm/conf.xml diff --git a/.docker/files/jwm/supervisord.conf b/.docker/files/jwm/supervisord.conf new file mode 100644 index 00000000..ddac11d9 --- /dev/null +++ b/.docker/files/jwm/supervisord.conf @@ -0,0 +1,10 @@ +[program:jwm] +environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" +command=/usr/bin/jwm -f /etc/neko/jwm.xml -display %(ENV_DISPLAY)s +autorestart=true +priority=300 +user=%(ENV_USER)s +stdout_logfile=/var/log/neko/jwm.log +stdout_logfile_maxbytes=100MB +stdout_logfile_backups=10 +redirect_stderr=true \ No newline at end of file diff --git a/.docker/files/openbox/Dockerfile b/.docker/files/openbox/Dockerfile new file mode 100644 index 00000000..c7d9635e --- /dev/null +++ b/.docker/files/openbox/Dockerfile @@ -0,0 +1,11 @@ +FROM nurdism/neko:base + +# +# install openbox +RUN set -eux; apt-get update; \ + apt-get install -y --no-install-recommends openbox; + +# +# copy openbox conf and supervisord conf +COPY .docker/files/openbox/supervisord.conf /etc/neko/supervisord/openbox.conf +COPY .docker/files/openbox/conf.xml /etc/neko/openbox.xml diff --git a/.docker/files/openbox/conf.xml b/.docker/files/openbox/conf.xml new file mode 100644 index 00000000..5e7aff0e --- /dev/null +++ b/.docker/files/openbox/conf.xml @@ -0,0 +1,753 @@ + + + + + + + + 10 + 20 + + + + yes + + no + + yes + + no + + 200 + + no + + + + + Smart + +
yes
+ + Primary + + 1 + +
+ + + Clearlooks + NLIMC + + yes + yes + + sans + 8 + + bold + + normal + + + + sans + 8 + + bold + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + bold + + normal + + + + sans + 9 + + bold + + normal + + + + + + + 10 + 1 + + + + 875 + + + + + yes + Nonpixel + + Center + + + + + 10 + + 10 + + + + + + + 0 + 0 + 0 + 0 + + + + TopLeft + + 0 + 0 + no + Above + + Vertical + + no + 300 + + 300 + + Middle + + + + + C-g + + + + leftno + + + rightno + + + upno + + + downno + + + leftno + + + rightno + + + upno + + + downno + + + 1 + + + 2 + + + 3 + + + 4 + + + + + + + + + + + + + + + + + + + + scrot -s + + + + + + + + + + + + + + + + + + + + + + + + yesyes + + + + + + + + + + + + right + + + + + left + + + + + up + + + + + down + + + + + + + + true + Konqueror + + kfmclient openProfile filemanagement + + + + + scrot + + + + + 1 + + 500 + + 400 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + previous + + + next + + + previous + + + next + + + previous + + + next + + + + + + + + + + + + + + no + + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + top + + + + + + left + + + + + + right + + + + + + bottom + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vertical + + + horizontal + + + + + + + + + + + + + + + + + previous + + + next + + + + previous + + + next + + + previous + + + next + + + + + + + + + + + + + + + + client-list-combined-menu + + + root-menu + + + + + + previous + + + next + + + previous + + + next + + + + + + + + + + + menu.xml + 200 + + no + + 100 + + 400 + + yes + + yes + + + + + + + +
diff --git a/.docker/files/openbox/supervisord.conf b/.docker/files/openbox/supervisord.conf new file mode 100644 index 00000000..eb906344 --- /dev/null +++ b/.docker/files/openbox/supervisord.conf @@ -0,0 +1,10 @@ +[program:openbox] +environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" +command=/usr/bin/openbox --config-file /etc/neko/openbox.xml +autorestart=true +priority=300 +user=%(ENV_USER)s +stdout_logfile=/var/log/neko/openbox.log +stdout_logfile_maxbytes=100MB +stdout_logfile_backups=10 +redirect_stderr=true diff --git a/.docker/files/opera/.gitkeep b/.docker/files/opera/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/.docker/files/popcorn/Dockerfile b/.docker/files/popcorn/Dockerfile new file mode 100644 index 00000000..18f342b2 --- /dev/null +++ b/.docker/files/popcorn/Dockerfile @@ -0,0 +1,15 @@ +FROM nurdism/neko:openbox + +# +# install popcorn time +RUN set -eux; apt-get update; \ + apt-get install -y --no-install-recommends ; \ + # + # clean up + apt-get clean -y; \ + rm -rf /var/lib/apt/lists/* /var/cache/apt/* + +# +# copy configuation files +COPY .docker/files/popcorn/supervisord.conf /etc/neko/supervisord/popcorn.conf +COPY .docker/files/popcorn/openbox.xml /etc/neko/openbox.xml \ No newline at end of file diff --git a/.docker/files/popcorn/openbox.xml b/.docker/files/popcorn/openbox.xml new file mode 100644 index 00000000..0e73a076 --- /dev/null +++ b/.docker/files/popcorn/openbox.xml @@ -0,0 +1,763 @@ + + + + + + + + 10 + 20 + + + + + + no + true + yes + normal + + + + + yes + + no + + yes + + no + + 200 + + no + + + + + Smart + +
yes
+ + Primary + + 1 + +
+ + + Clearlooks + NLIMC + + yes + yes + + sans + 8 + + bold + + normal + + + + sans + 8 + + bold + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + normal + + normal + + + + sans + 9 + + bold + + normal + + + + sans + 9 + + bold + + normal + + + + + + + 1 + 1 + + + + 875 + + + + + yes + Nonpixel + + Center + + + + + 10 + + 10 + + + + + + + 0 + 0 + 0 + 0 + + + + TopLeft + + 0 + 0 + no + Above + + Vertical + + no + 300 + + 300 + + Middle + + + + + C-g + + + + leftno + + + rightno + + + upno + + + downno + + + leftno + + + rightno + + + upno + + + downno + + + 1 + + + 2 + + + 3 + + + 4 + + + + + + + + + + + + + + + + + + + + scrot -s + + + + + + + + + + + + + + + + + + + + + + + + yesyes + + + + + + + + + + + + right + + + + + left + + + + + up + + + + + down + + + + + + + + true + Konqueror + + kfmclient openProfile filemanagement + + + + + scrot + + + + + 1 + + 500 + + 400 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + previous + + + next + + + previous + + + next + + + previous + + + next + + + + + + + + + + + + + + no + + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + + + + + top + + + + + + left + + + + + + right + + + + + + bottom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vertical + + + horizontal + + + + + + + + + + + + + + + + + previous + + + next + + + + previous + + + next + + + previous + + + next + + + + + + + + + + + + + + + + + + + + previous + + + next + + + previous + + + next + + + + + + + + + + + menu.xml + 200 + + no + + 100 + + 400 + + yes + + yes + + + + + + + +
diff --git a/.docker/files/popcorn/supervisord.conf b/.docker/files/popcorn/supervisord.conf new file mode 100644 index 00000000..3ba90fcc --- /dev/null +++ b/.docker/files/popcorn/supervisord.conf @@ -0,0 +1,11 @@ + +[program:popcorn] +environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" +command= +autorestart=true +priority=800 +user=%(ENV_USER)s +stdout_logfile=/var/log/neko/popcorn.log +stdout_logfile_maxbytes=100MB +stdout_logfile_backups=10 +redirect_stderr=true \ No newline at end of file diff --git a/.docker/files/xfce4/Dockerfile b/.docker/files/xfce4/Dockerfile new file mode 100644 index 00000000..12105f3f --- /dev/null +++ b/.docker/files/xfce4/Dockerfile @@ -0,0 +1,11 @@ +FROM nurdism/neko:base + +# +# install xfce4 +RUN set -eux; apt-get update; \ + apt-get install -y --no-install-recommends xfce4; + +# +# copy xfce4 conf and supervisord conf +COPY .docker/files/xfce4/supervisord.conf /etc/neko/openbox.xml +# COPY .docker/files/xfce4/xfconf /etc/neko/xfconf diff --git a/.docker/files/xfce4/supervisord.conf b/.docker/files/xfce4/supervisord.conf new file mode 100644 index 00000000..7eecca65 --- /dev/null +++ b/.docker/files/xfce4/supervisord.conf @@ -0,0 +1,10 @@ +[program:xfce4] +environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" +command=/usr/bin/xfce4-session +autorestart=true +priority=300 +user=%(ENV_USER)s +stdout_logfile=/var/log/neko/xfce4.log +stdout_logfile_maxbytes=100MB +stdout_logfile_backups=10 +redirect_stderr=true