From f6d238f65cf44304cbb9fd47b5e1fd794fe6be07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=83=C2=A1bio=20Rodrigues=20Ribeiro?= Date: Mon, 18 Sep 2017 19:27:56 -0300 Subject: [PATCH 01/87] Adjust SHM size --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 1be8947..1564da5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: - HOST_HOSTNAME=${HOSTNAME} cpuset: '0' mem_limit: 512M + shm-size: 2g volumes: - /dev/shm:/dev/shm - /tmp/.X11-unix:/tmp/.X11-unix From 7e3619c3dedff531a59ac7cb943961eaaf2f5a41 Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Tue, 19 Sep 2017 09:44:36 -0300 Subject: [PATCH 02/87] Change dash by underline --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1564da5..7b1fd51 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: - HOST_HOSTNAME=${HOSTNAME} cpuset: '0' mem_limit: 512M - shm-size: 2g + shm_size: 2g volumes: - /dev/shm:/dev/shm - /tmp/.X11-unix:/tmp/.X11-unix From b589d8a9b6d7344d122329b51d07b21bed1d3632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Thu, 7 Dec 2017 20:34:25 -0200 Subject: [PATCH 03/87] Set a root password --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d0a0497..31adf9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN apt-get update \ && useradd -u 1000 -r -g ff -G audio,video ff -d /home/ff \ && chmod 744 /home/ff/startup.sh \ && chown -R ff:ff /home/ff \ - && passwd -d root \ + && echo root:wscef | chpasswd \ && apt-get purge --auto-remove -y \ && rm -rf /var/lib/apt/lists/* From 660c29974a7b43ccd2ceb82281167724d1583e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Thu, 7 Dec 2017 20:46:46 -0200 Subject: [PATCH 04/87] Add a PS on README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9a27817..98f8e14 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,5 @@ https://github.com/farribeiro/wscef-docker/issues/9#issuecomment-308244119 **PS:** you must run Docker using a GNU/Linux distro running xorg. Be aware some installations may run another display server, such as Wayland. + +**PS:** The root password is **wscef** by https://github.com/farribeiro/wscef-docker/issues/29 From 89df93e690270f782efbf28fca1833872630438a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Wed, 13 Dec 2017 18:07:40 -0200 Subject: [PATCH 05/87] Add the interactive mode on docker start command --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 98f8e14..15a027a 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ since environments and volumes are set on `docker-compose.yml`. **To first run:** `docker-compose run --name wscef wscef` -**To other runs:** `docker start -a wscef` +**To other runs:** `docker start -i -a wscef` **PS:** Reports that the warsaw daemon for CEF works for the BB site: https://github.com/farribeiro/wscef-docker/issues/9#issuecomment-308244119 From 76f0bd0ae6283aecab540fc889a029ce9032eb63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Tue, 13 Feb 2018 22:48:01 -0200 Subject: [PATCH 06/87] Adicionado nome ao container --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 7b1fd51..ea7866a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,7 @@ version: '2' services: wscef: + container_name: wscef image: farribeiro/wscef-docker build: . devices: From 8b98a9b1508caf8e572fa90e379858e669aa0eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 12 May 2018 16:30:28 -0300 Subject: [PATCH 07/87] Added warsaw dependecies manually --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 31adf9b..8e2fb42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,8 @@ RUN apt-get update \ language-pack-pt \ openssl \ libnss3-tools \ + libcurl4 \ + python-gpg \ firefox \ firefox-locale-pt \ xauth \ From f6a8e41616a5047823643e83b219ae4e6856740a Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Fri, 18 May 2018 11:24:52 -0300 Subject: [PATCH 08/87] Remove manual dependencies --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8e2fb42..31adf9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,6 @@ RUN apt-get update \ language-pack-pt \ openssl \ libnss3-tools \ - libcurl4 \ - python-gpg \ firefox \ firefox-locale-pt \ xauth \ From a88e969d1c294fc8d866b857bf95cdbd71815e98 Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Fri, 18 May 2018 11:39:19 -0300 Subject: [PATCH 09/87] Adiciona o sed --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 31adf9b..02d4d4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN apt-get update \ firefox \ firefox-locale-pt \ xauth \ + sed \ --no-install-recommends \ && groupadd -g 1000 -r ff \ && useradd -u 1000 -r -g ff -G audio,video ff -d /home/ff \ From 86db0ed68a344c6a3f8528ea839ceb21d414dcdf Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Fri, 18 May 2018 11:39:59 -0300 Subject: [PATCH 10/87] Renomeia original --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 02d4d4b..0f567b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,7 @@ RUN apt-get update \ && chmod 744 /home/ff/startup.sh \ && chown -R ff:ff /home/ff \ && echo root:wscef | chpasswd \ + && mv /src/GBPCEFwr64.deb /src/warsaw.deb \ && apt-get purge --auto-remove -y \ && rm -rf /var/lib/apt/lists/* From 9a011d5fa60af6fa06521dc00cfe92c4523b78ec Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Fri, 18 May 2018 11:40:16 -0300 Subject: [PATCH 11/87] Extrai pacote deb --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 0f567b8..afc8395 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,7 @@ RUN apt-get update \ && chown -R ff:ff /home/ff \ && echo root:wscef | chpasswd \ && mv /src/GBPCEFwr64.deb /src/warsaw.deb \ + && dpkg-deb -R /src/warsaw.deb /src/warsaw \ && apt-get purge --auto-remove -y \ && rm -rf /var/lib/apt/lists/* From 9b5af668821c0594e771df355f176ffab5908110 Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Fri, 18 May 2018 11:40:40 -0300 Subject: [PATCH 12/87] Altera dependencias --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index afc8395..c1a6009 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,6 +26,9 @@ RUN apt-get update \ && echo root:wscef | chpasswd \ && mv /src/GBPCEFwr64.deb /src/warsaw.deb \ && dpkg-deb -R /src/warsaw.deb /src/warsaw \ + && sed -i 's/python-gpgme/python-gpg/g' /src/warsaw/DEBIAN/control \ + && sed -i 's/libcurl3/libcurl4/g' /src/warsaw/DEBIAN/control \ + && sed -i 's/gpgme/gpg/g' /src/warsaw/usr/bin/warsaw \ && apt-get purge --auto-remove -y \ && rm -rf /var/lib/apt/lists/* From 603842c8d69f062646492132c4c532969de8c9b8 Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Fri, 18 May 2018 11:53:38 -0300 Subject: [PATCH 13/87] Reempacota --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index c1a6009..5b090f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,7 @@ RUN apt-get update \ && sed -i 's/python-gpgme/python-gpg/g' /src/warsaw/DEBIAN/control \ && sed -i 's/libcurl3/libcurl4/g' /src/warsaw/DEBIAN/control \ && sed -i 's/gpgme/gpg/g' /src/warsaw/usr/bin/warsaw \ + && dpkg-deb -b /src/warsaw /src/GBPCEFwr64.deb \ && apt-get purge --auto-remove -y \ && rm -rf /var/lib/apt/lists/* From c1f9e3c14cfd971bc93448d35af6fcc9f9ca01f4 Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Fri, 18 May 2018 15:45:56 -0300 Subject: [PATCH 14/87] Trocado pacote --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b090f0..83ff9f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:latest LABEL maintainer "Fabio Rodrigues Ribeiro " -ADD https://cloud.gastecnologia.com.br/cef/warsaw/install/GBPCEFwr64.deb /src/ +ADD https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw-setup-ubuntu_64.deb /src/warsaw.deb COPY startup.sh /home/ff/ # Install Firefox @@ -24,7 +24,6 @@ RUN apt-get update \ && chmod 744 /home/ff/startup.sh \ && chown -R ff:ff /home/ff \ && echo root:wscef | chpasswd \ - && mv /src/GBPCEFwr64.deb /src/warsaw.deb \ && dpkg-deb -R /src/warsaw.deb /src/warsaw \ && sed -i 's/python-gpgme/python-gpg/g' /src/warsaw/DEBIAN/control \ && sed -i 's/libcurl3/libcurl4/g' /src/warsaw/DEBIAN/control \ From 7996de591ea6bc3f1a45fec53d9cf6e8b92cdc9b Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Fri, 18 May 2018 22:36:02 -0300 Subject: [PATCH 15/87] Install all dependencies --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Dockerfile b/Dockerfile index 83ff9f3..7c0396d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,25 @@ RUN apt-get update \ firefox-locale-pt \ xauth \ sed \ + libdbus-1-3 \ + procps \ + python2.7 \ + libpython2.7-minimal \ + libpython2.7-stdlib \ + python-gpg \ + python-openssl \ + zenity \ + libc6 \ + libcurl4 \ + libgtk2.0-0 \ + libgdk-pixbuf2.0-0 \ + libpango-1.0-0 \ + libglib2.0-0 \ + libx11-6 \ + libstdc++6 \ + libgcc1 \ + libssl1.0.0 \ + libxi6 \ --no-install-recommends \ && groupadd -g 1000 -r ff \ && useradd -u 1000 -r -g ff -G audio,video ff -d /home/ff \ From 193c54d9dfd25847f16ff6aa028d34fd2812d2d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Tue, 15 May 2018 09:49:32 -0300 Subject: [PATCH 16/87] Add purge instruction --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 15a027a..d75cf01 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ since environments and volumes are set on `docker-compose.yml`. **To other runs:** `docker start -i -a wscef` +**To purge enverthing:** `docker-compose down --rmi all`, thanks[1] + **PS:** Reports that the warsaw daemon for CEF works for the BB site: https://github.com/farribeiro/wscef-docker/issues/9#issuecomment-308244119 @@ -22,3 +24,5 @@ https://github.com/farribeiro/wscef-docker/issues/9#issuecomment-308244119 Be aware some installations may run another display server, such as Wayland. **PS:** The root password is **wscef** by https://github.com/farribeiro/wscef-docker/issues/29 + +[1] https://github.com/jsalatiel/wsbb-docker/commit/72e42bb5f04fbe8eb1f7f3e6226975aba137dcb5#diff-3254677a7917c6c01f55212f86c57fbf From 8b3c7c27a902a09737ac91059f98c4947014f974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Tue, 15 May 2018 09:53:31 -0300 Subject: [PATCH 17/87] Force replacing container --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d75cf01..ce850aa 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ since environments and volumes are set on `docker-compose.yml`. **To purge enverthing:** `docker-compose down --rmi all`, thanks[1] +**To force replace the container:** `docker-compose up --force-recreate`, thanks[1] + **PS:** Reports that the warsaw daemon for CEF works for the BB site: https://github.com/farribeiro/wscef-docker/issues/9#issuecomment-308244119 From ca93ef60ac63aa484254470465bb68ad05cfe161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Thu, 17 May 2018 10:06:47 -0300 Subject: [PATCH 18/87] Add pre-requisites --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ce850aa..bbb5766 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ Warsaw in docker container +## Pre-requisites + +- Docker and Docker-Compose of your distro. + ## Instructions Use docker compose to build and run the docker container, rather than `docker run`, From ef4b274f73939582ae37586843cd2b16b7d65b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Thu, 17 May 2018 10:09:49 -0300 Subject: [PATCH 19/87] Correct the word orthography --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bbb5766..3954643 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ since environments and volumes are set on `docker-compose.yml`. **To other runs:** `docker start -i -a wscef` -**To purge enverthing:** `docker-compose down --rmi all`, thanks[1] +**To purge everthing:** `docker-compose down --rmi all`, thanks[1] **To force replace the container:** `docker-compose up --force-recreate`, thanks[1] From bb734a18398897ed629e6993f28b24c2389388b7 Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Fri, 18 May 2018 22:36:02 -0300 Subject: [PATCH 20/87] Install all dependencies # Conflicts: # Dockerfile --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Dockerfile b/Dockerfile index 31adf9b..c4c1fef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,26 @@ RUN apt-get update \ firefox \ firefox-locale-pt \ xauth \ + sed \ + libdbus-1-3 \ + procps \ + python2.7 \ + libpython2.7-minimal \ + libpython2.7-stdlib \ + python-gpg \ + python-openssl \ + zenity \ + libc6 \ + libcurl4 \ + libgtk2.0-0 \ + libgdk-pixbuf2.0-0 \ + libpango-1.0-0 \ + libglib2.0-0 \ + libx11-6 \ + libstdc++6 \ + libgcc1 \ + libssl1.0.0 \ + libxi6 \ --no-install-recommends \ && groupadd -g 1000 -r ff \ && useradd -u 1000 -r -g ff -G audio,video ff -d /home/ff \ From 14cbad8047364deb2ccef5b3f9342cd3262d7662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 27 Jan 2018 00:25:10 -0200 Subject: [PATCH 21/87] Add exception for sudo --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 31adf9b..1e23896 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,8 @@ RUN apt-get update \ && useradd -u 1000 -r -g ff -G audio,video ff -d /home/ff \ && chmod 744 /home/ff/startup.sh \ && chown -R ff:ff /home/ff \ + && echo 'ff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ + && echo 'Defaults !requiretty' >> /etc/sudoers \ && echo root:wscef | chpasswd \ && apt-get purge --auto-remove -y \ && rm -rf /var/lib/apt/lists/* From bacc4eeb879345625e27a6da0407ae7fc2d62b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 27 Jan 2018 00:26:27 -0200 Subject: [PATCH 22/87] Add sudo package --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 1e23896..07a7a26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN apt-get update \ firefox \ firefox-locale-pt \ xauth \ + sudo \ --no-install-recommends \ && groupadd -g 1000 -r ff \ && useradd -u 1000 -r -g ff -G audio,video ff -d /home/ff \ From db0059f9f2eebbfb023417d60880432418cb285c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 27 Jan 2018 00:28:50 -0200 Subject: [PATCH 23/87] Use sudo instead su --- startup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/startup.sh b/startup.sh index 98f1982..bec6791 100644 --- a/startup.sh +++ b/startup.sh @@ -17,9 +17,11 @@ fi if [ ! -d ~/.mozilla ] then firefox -CreateProfile default \ - && su -c "apt update && apt -y upgrade && apt -y install /src/GBPCEFwr64.deb" + && sudo "apt update" \ + && sudo "apt -y upgrade" \ + && sudo "apt -y install /src/GBPCEFwr64.deb" else - su -c "/etc/init.d/warsaw start" + sudo "/etc/init.d/warsaw start" fi /usr/local/bin/warsaw/core \ From 5f6f0d17a9cb34f879d1884e0822ce2d5333414d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 26 May 2018 19:10:25 -0300 Subject: [PATCH 24/87] Add a uuidgen command --- startup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index bec6791..2b3bc29 100644 --- a/startup.sh +++ b/startup.sh @@ -16,7 +16,8 @@ fi if [ ! -d ~/.mozilla ] then - firefox -CreateProfile default \ + sudo "dbus-uuidgen > /etc/machine-id" \ + && firefox -CreateProfile default \ && sudo "apt update" \ && sudo "apt -y upgrade" \ && sudo "apt -y install /src/GBPCEFwr64.deb" From c75c6d99e8953cc8460d0cd2cfb63f7d830f5cc8 Mon Sep 17 00:00:00 2001 From: Aurelio Jargas Date: Sun, 27 May 2018 18:50:31 -0300 Subject: [PATCH 25/87] Fix typos --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 07a7a26..edbad2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,11 +29,11 @@ RUN apt-get update \ && apt-get purge --auto-remove -y \ && rm -rf /var/lib/apt/lists/* -# Run firefox as non privileged user +# Run Firefox as non privileged user USER ff # Add volume for recipes PDFs VOLUME "/home/ff/Downloads" -# Autorun chrome +# Autorun Firefox CMD [ "/home/ff/startup.sh" ] From 407eec81ea946d013493364d8b70cb60b91d1de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sun, 27 May 2018 21:52:39 -0300 Subject: [PATCH 26/87] Closes #47 --- startup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/startup.sh b/startup.sh index bec6791..954f5fc 100644 --- a/startup.sh +++ b/startup.sh @@ -17,9 +17,9 @@ fi if [ ! -d ~/.mozilla ] then firefox -CreateProfile default \ - && sudo "apt update" \ - && sudo "apt -y upgrade" \ - && sudo "apt -y install /src/GBPCEFwr64.deb" + && sudo apt update \ + && sudo apt -y upgrade \ + && sudo apt -y install /src/GBPCEFwr64.deb else sudo "/etc/init.d/warsaw start" fi From 84ca201e3eeefb23119b0d1751ae58f7a50ae1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Mon, 28 May 2018 14:10:22 -0300 Subject: [PATCH 27/87] Remove quotation marks --- startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index 954f5fc..f7aefad 100644 --- a/startup.sh +++ b/startup.sh @@ -21,7 +21,7 @@ then && sudo apt -y upgrade \ && sudo apt -y install /src/GBPCEFwr64.deb else - sudo "/etc/init.d/warsaw start" + sudo /etc/init.d/warsaw start fi /usr/local/bin/warsaw/core \ From a1ec62af586313a8102b0da2bdc1492bd0b3b71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Mon, 28 May 2018 15:05:07 -0300 Subject: [PATCH 28/87] Remove quotation marks --- startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index 2b3bc29..9cd8110 100644 --- a/startup.sh +++ b/startup.sh @@ -16,7 +16,7 @@ fi if [ ! -d ~/.mozilla ] then - sudo "dbus-uuidgen > /etc/machine-id" \ + sudo dbus-uuidgen > /etc/machine-id \ && firefox -CreateProfile default \ && sudo "apt update" \ && sudo "apt -y upgrade" \ From 55c68937849942443a6c77edbc1627694d050ca1 Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Mon, 11 Jun 2018 23:15:38 -0300 Subject: [PATCH 29/87] Sort packages --- Dockerfile | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index c4c1fef..38ceecc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,32 +11,32 @@ COPY startup.sh /home/ff/ RUN apt-get update \ && apt-get upgrade -y \ && apt-get install -y \ - language-pack-pt \ - openssl \ - libnss3-tools \ firefox \ firefox-locale-pt \ - xauth \ - sed \ - libdbus-1-3 \ - procps \ - python2.7 \ - libpython2.7-minimal \ - libpython2.7-stdlib \ - python-gpg \ - python-openssl \ - zenity \ + language-pack-pt \ libc6 \ libcurl4 \ - libgtk2.0-0 \ + libdbus-1-3 \ + libgcc1 \ libgdk-pixbuf2.0-0 \ - libpango-1.0-0 \ libglib2.0-0 \ - libx11-6 \ - libstdc++6 \ - libgcc1 \ + libgtk2.0-0 \ + libnss3-tools \ + libpango-1.0-0 \ + libpython2.7-minimal \ + libpython2.7-stdlib \ libssl1.0.0 \ + libstdc++6 \ + libx11-6 \ libxi6 \ + openssl \ + procps \ + python-gpg \ + python-openssl \ + python2.7 \ + sed \ + xauth \ + zenity \ --no-install-recommends \ && groupadd -g 1000 -r ff \ && useradd -u 1000 -r -g ff -G audio,video ff -d /home/ff \ From 27950dab6abb83c29e3a90c3c39431702240c78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Thu, 21 Jun 2018 13:09:38 -0300 Subject: [PATCH 30/87] Alterado imagem base --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 901fc32..ba6c1f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Run Warsaw in a container # Base docker image -FROM ubuntu:latest +FROM debian:stretch-slim LABEL maintainer "Fabio Rodrigues Ribeiro " ADD https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw-setup-ubuntu_64.deb /src/warsaw.deb From ac02a4dd054057f954b48079a406dce403c6d42b Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Wed, 1 Aug 2018 22:30:47 -0300 Subject: [PATCH 31/87] Acertado pacotes da imagem base --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ba6c1f8..ac3279e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,9 +11,8 @@ COPY startup.sh /home/ff/ RUN apt-get update \ && apt-get upgrade -y \ && apt-get install -y \ - firefox \ - firefox-locale-pt \ - language-pack-pt \ + firefox-esr \ + firefox-esr-l10n-pt-br \ libc6 \ libcurl4 \ libdbus-1-3 \ From 19cfe66a8ae0523ea7b3b98d9d48fd27da7b4bd6 Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Wed, 1 Aug 2018 22:32:12 -0300 Subject: [PATCH 32/87] =?UTF-8?q?Acertado=20configura=C3=A7=C3=B5es=20para?= =?UTF-8?q?=20imagem=20base?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index ea7866a..818f0ee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,7 @@ services: devices: - /dev/snd:/dev/snd environment: + - LANG=pt_BR.UTF-8 - DISPLAY=${DISPLAY} - XAUTHORITY=/home/ff/.Xauthority - HOST_HOSTNAME=${HOSTNAME} From 82627057af4a1203e54c292530fb6a3eafb1198c Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Wed, 1 Aug 2018 22:33:54 -0300 Subject: [PATCH 33/87] =?UTF-8?q?Remove=20altera=C3=A7=C3=B5es=20obsoletas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index ac3279e..42be68c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,11 +45,6 @@ RUN apt-get update \ && echo 'ff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ && echo 'Defaults !requiretty' >> /etc/sudoers \ && echo root:wscef | chpasswd \ - && dpkg-deb -R /src/warsaw.deb /src/warsaw \ - && sed -i 's/python-gpgme/python-gpg/g' /src/warsaw/DEBIAN/control \ - && sed -i 's/libcurl3/libcurl4/g' /src/warsaw/DEBIAN/control \ - && sed -i 's/gpgme/gpg/g' /src/warsaw/usr/bin/warsaw \ - && dpkg-deb -b /src/warsaw /src/GBPCEFwr64.deb \ && apt-get purge --auto-remove -y \ && rm -rf /var/lib/apt/lists/* From 0109b9b346333148cf84d9dd5be2af37c67ee0ed Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Wed, 1 Aug 2018 22:42:12 -0300 Subject: [PATCH 34/87] Adiciona ambiente USER E GUID --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 901fc32..a64cbc9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,9 @@ FROM ubuntu:latest LABEL maintainer "Fabio Rodrigues Ribeiro " +ENV USER=ff +ENV GUID=1000 + ADD https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw-setup-ubuntu_64.deb /src/warsaw.deb COPY startup.sh /home/ff/ @@ -39,10 +42,10 @@ RUN apt-get update \ xauth \ zenity \ --no-install-recommends \ - && groupadd -g 1000 -r ff \ - && useradd -u 1000 -r -g ff -G audio,video ff -d /home/ff \ && chmod 744 /home/ff/startup.sh \ - && chown -R ff:ff /home/ff \ + && groupadd -g ${GUID} -r ${USER} \ + && useradd -u ${GUID} -r -g ${USER} -G audio,video ${USER} -d /home/${USER} \ + && chown -R ${GUID}:${GUID} /home/${USER} \ && echo 'ff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ && echo 'Defaults !requiretty' >> /etc/sudoers \ && echo root:wscef | chpasswd \ From d7a44b994bc3ca44dca5297f181495760a8d051f Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Wed, 1 Aug 2018 23:02:19 -0300 Subject: [PATCH 35/87] =?UTF-8?q?For=C3=A7a=20cria=C3=A7=C3=A3o=20da=20hom?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index a64cbc9..d9097e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,6 +42,7 @@ RUN apt-get update \ xauth \ zenity \ --no-install-recommends \ + && mkdir -p /home/${USER} \ && chmod 744 /home/ff/startup.sh \ && groupadd -g ${GUID} -r ${USER} \ && useradd -u ${GUID} -r -g ${USER} -G audio,video ${USER} -d /home/${USER} \ From 1d16626065720cde9e01a063398687d8d6fa6297 Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Thu, 2 Aug 2018 08:40:02 -0300 Subject: [PATCH 36/87] Coloca dentro do comando RUN --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 901fc32..c5a0650 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,6 @@ FROM ubuntu:latest LABEL maintainer "Fabio Rodrigues Ribeiro " -ADD https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw-setup-ubuntu_64.deb /src/warsaw.deb COPY startup.sh /home/ff/ # Install Firefox @@ -14,6 +13,7 @@ RUN apt-get update \ firefox \ firefox-locale-pt \ language-pack-pt \ + && wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb libc6 \ libcurl4 \ libdbus-1-3 \ From 199e83d554c1791f4653ba8631a9de48689b7de1 Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Thu, 2 Aug 2018 08:40:28 -0300 Subject: [PATCH 37/87] =?UTF-8?q?Pr=C3=A9=20dependencias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index c5a0650..24309de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,8 @@ COPY startup.sh /home/ff/ RUN apt-get update \ && apt-get upgrade -y \ && apt-get install -y \ + ca-certificates \ + wget \ firefox \ firefox-locale-pt \ language-pack-pt \ From e84a458a4bf972e61109c4222ed3a899124eb88b Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Thu, 2 Aug 2018 08:41:09 -0300 Subject: [PATCH 38/87] Novo layer --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 24309de..abc79e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,7 @@ RUN apt-get update \ firefox-locale-pt \ language-pack-pt \ && wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb +RUN apt-get install -y \ libc6 \ libcurl4 \ libdbus-1-3 \ From 645b34a6c8edbc7244b048663f737f23bacddd54 Mon Sep 17 00:00:00 2001 From: Fabio Rodrigues Ribeiro Date: Thu, 2 Aug 2018 08:44:32 -0300 Subject: [PATCH 39/87] =?UTF-8?q?Op=C3=A7=C3=A3o=20faltante=20e=20for?= =?UTF-8?q?=C3=A7a=20diret=C3=B3rio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index abc79e7..495fba0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,8 @@ RUN apt-get update \ && apt-get install -y \ ca-certificates \ wget \ + --no-install-recommends \ + && mkdir -p /src \ firefox \ firefox-locale-pt \ language-pack-pt \ From 06d7265abd5290c01cdfa2d6b9b9639634a584e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Fri, 24 Aug 2018 00:03:31 -0300 Subject: [PATCH 40/87] Upgrade description --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3954643..cfe8308 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # wscef-docker -Warsaw in docker container +Warsaw in docker container. Warsaw is a security module, a.k.a Guardião, for brazilian +internet banking. This project is compatible of Banco do Brasil and Caixa Econômica +Federal. ## Pre-requisites From 73c6513d11e468a846fb57b1df73261ce518b989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Fri, 19 Oct 2018 20:04:28 -0300 Subject: [PATCH 41/87] Isolate the conflict packages --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index aec8746..d68d20e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN apt-get install -y \ firefox-esr \ firefox-esr-l10n-pt-br \ libc6 \ - libcurl4 \ + # libcurl4 \ libdbus-1-3 \ libgcc1 \ libgdk-pixbuf2.0-0 \ @@ -32,7 +32,7 @@ RUN apt-get install -y \ libpango-1.0-0 \ libpython2.7-minimal \ libpython2.7-stdlib \ - libssl1.0.0 \ + # libssl1.0.0 \ libstdc++6 \ libx11-6 \ libxi6 \ From 36bd715160f6fa69b59cddb1f45ab103fe2a5b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 3 Nov 2018 23:10:05 -0300 Subject: [PATCH 42/87] Isolates dbus-uuidgen --- startup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/startup.sh b/startup.sh index 97b8689..b04674d 100644 --- a/startup.sh +++ b/startup.sh @@ -16,8 +16,8 @@ fi if [ ! -d ~/.mozilla ] then - sudo dbus-uuidgen > /etc/machine-id \ - && firefox -CreateProfile default \ + # sudo dbus-uuidgen > /etc/machine-id \ + firefox -CreateProfile default \ && sudo apt update \ && sudo apt -y upgrade \ && sudo apt -y install /src/GBPCEFwr64.deb From 70bdea6eb378cda7aa2e1e04ab1d2d2e36893356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 3 Nov 2018 23:16:32 -0300 Subject: [PATCH 43/87] Add dbus-uuidgen volume --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 818f0ee..7eabf0f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,3 +19,4 @@ services: - /tmp/.X11-unix:/tmp/.X11-unix - ${XAUTHORITY}:/tmp/.docker.xauth:ro - ~/BankFiles:/home/ff/Downloads + - /etc/machine-id:/etc/machine-id:ro From f979210d94d48d05528ea397ca7c17e5772b4e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Martano?= Date: Fri, 11 Jan 2019 22:42:09 +0000 Subject: [PATCH 44/87] Setup locale To avoid warsaw's: "locale.Error: unsupported locale setting" Based on: https://hub.docker.com/_/debian#locales --- Dockerfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d68d20e..d19964c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,11 +7,18 @@ LABEL maintainer "Fabio Rodrigues Ribeiro " ENV USER=ff ENV GUID=1000 +# Setup locale +ENV LANGUAGE pt_BR.UTF-8 +ENV LANG pt_BR.UTF-8 +ENV LC_ALL pt_BR.UTF-8 +RUN apt-get update && apt-get install -y locales \ + && localedef -i pt_BR -c -f UTF-8 -A /usr/share/locale/locale.alias pt_BR.UTF-8 + + COPY startup.sh /home/ff/ # Install Firefox -RUN apt-get update \ - && apt-get upgrade -y \ +RUN apt-get upgrade -y \ && apt-get install -y \ ca-certificates \ wget \ From 9d08b7eead23f62cea144fcc039b2c8189a5cc91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 12 Jan 2019 02:39:42 -0200 Subject: [PATCH 45/87] No remote --- startup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/startup.sh b/startup.sh index b04674d..394a6f4 100644 --- a/startup.sh +++ b/startup.sh @@ -17,7 +17,7 @@ fi if [ ! -d ~/.mozilla ] then # sudo dbus-uuidgen > /etc/machine-id \ - firefox -CreateProfile default \ + firefox -no-remote -CreateProfile default \ && sudo apt update \ && sudo apt -y upgrade \ && sudo apt -y install /src/GBPCEFwr64.deb @@ -26,4 +26,4 @@ else fi /usr/local/bin/warsaw/core \ -&& firefox -private-window www.caixa.gov.br +&& firefox -no-remote -private-window www.caixa.gov.br From 4a444b38cc82a9127ef17d49b95b98a6d110e3c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 12 Jan 2019 02:42:25 -0200 Subject: [PATCH 46/87] Bump docker-compose version --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7eabf0f..9d0d0b2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2' +version: '3' services: wscef: container_name: wscef From 3f40574977545dc97a987ddb0cb5743d321928d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 12 Jan 2019 02:53:11 -0200 Subject: [PATCH 47/87] Remove feature --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index d19964c..cf0111b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,6 +61,7 @@ RUN apt-get install -y \ && echo 'ff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ && echo 'Defaults !requiretty' >> /etc/sudoers \ && echo root:wscef | chpasswd \ + && apt-get remove wget \ && apt-get purge --auto-remove -y \ && rm -rf /var/lib/apt/lists/* From 7166eab57dac117fb8961a24d4030de1347d936a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 12 Jan 2019 08:55:09 -0200 Subject: [PATCH 48/87] Runtime ENV --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 9d0d0b2..28aa13d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,8 @@ services: devices: - /dev/snd:/dev/snd environment: + - LANGUAGE="pt_BR.UTF-8" + - LC_ALL="pt_BR.UTF-8" - LANG=pt_BR.UTF-8 - DISPLAY=${DISPLAY} - XAUTHORITY=/home/ff/.Xauthority From 5ffda94c66f3ff932d2ecd185f8bfda0a09c1f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 12 Jan 2019 08:58:25 -0200 Subject: [PATCH 49/87] Remove ENV variables --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cf0111b..f0f7a40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,9 +8,6 @@ ENV USER=ff ENV GUID=1000 # Setup locale -ENV LANGUAGE pt_BR.UTF-8 -ENV LANG pt_BR.UTF-8 -ENV LC_ALL pt_BR.UTF-8 RUN apt-get update && apt-get install -y locales \ && localedef -i pt_BR -c -f UTF-8 -A /usr/share/locale/locale.alias pt_BR.UTF-8 From a9e4c97161911525f2d5b357d7e2d596e53ad228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 12 Jan 2019 09:52:15 -0200 Subject: [PATCH 50/87] Remove quote --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 28aa13d..790a65e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,8 @@ services: devices: - /dev/snd:/dev/snd environment: - - LANGUAGE="pt_BR.UTF-8" - - LC_ALL="pt_BR.UTF-8" + - LANGUAGE=pt_BR.UTF-8 + - LC_ALL=pt_BR.UTF-8 - LANG=pt_BR.UTF-8 - DISPLAY=${DISPLAY} - XAUTHORITY=/home/ff/.Xauthority From c8189cbada3e860f56197f01319d03b157b3c97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 12 Jan 2019 10:20:57 -0200 Subject: [PATCH 51/87] Fix command --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f0f7a40..8a35900 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,7 +58,7 @@ RUN apt-get install -y \ && echo 'ff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ && echo 'Defaults !requiretty' >> /etc/sudoers \ && echo root:wscef | chpasswd \ - && apt-get remove wget \ + && apt-get remove -y wget \ && apt-get purge --auto-remove -y \ && rm -rf /var/lib/apt/lists/* From 1e6a3f81c85097f87f93bee1b899022da26a29c0 Mon Sep 17 00:00:00 2001 From: Diego Rabatone Oliveira Date: Sat, 12 Jan 2019 10:57:36 -0200 Subject: [PATCH 52/87] Move startup file to the end of the Dockerfile If there is a change in the startup.sh file there is no need to reinstall everything, we just need to copy it again. This way we benefit from docker layers caches. --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8a35900..c7bd6a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,9 +11,6 @@ ENV GUID=1000 RUN apt-get update && apt-get install -y locales \ && localedef -i pt_BR -c -f UTF-8 -A /usr/share/locale/locale.alias pt_BR.UTF-8 - -COPY startup.sh /home/ff/ - # Install Firefox RUN apt-get upgrade -y \ && apt-get install -y \ @@ -51,7 +48,6 @@ RUN apt-get install -y \ zenity \ --no-install-recommends \ && mkdir -p /home/${USER} \ - && chmod 744 /home/ff/startup.sh \ && groupadd -g ${GUID} -r ${USER} \ && useradd -u ${GUID} -r -g ${USER} -G audio,video ${USER} -d /home/${USER} \ && chown -R ${GUID}:${GUID} /home/${USER} \ @@ -68,5 +64,8 @@ USER ff # Add volume for recipes PDFs VOLUME "/home/ff/Downloads" +COPY startup.sh /home/ff/ +RUN chmod 744 /home/ff/startup.sh \ + # Autorun Firefox CMD [ "/home/ff/startup.sh" ] From 1de14430198b5e55dd5b6945e3c182bb82e42ffc Mon Sep 17 00:00:00 2001 From: Diego Rabatone Oliveira Date: Sat, 12 Jan 2019 11:20:17 -0200 Subject: [PATCH 53/87] Handle Locales according to Debian Docs According to [1]: "Using LC_ALL is strongly discouraged as it overrides everything. Please use it only when testing and never set it in a startup file. " And according to [2]: "First, you have to set EnvironmentVariables such as LANG, LANGUAGE, LC_CTYPE, LC_MESSAGES to your local language. Usually LANG (or LC_ALL) is sufficient." So I've left only LANG env variable. Also, defining the variable in the docker-compose may not be enought, if one builds the Dockerimage using docker (and not docker-compose) we won't have the env variable available in order to build the locale while building the image. At last but not least, using localedef is a manual way to build the locale. If at any point the locales are built again, then the manual ones will be dropped, so it is prefered to use locale-gen. 1: https://wiki.debian.org/Locale 2: https://wiki.debian.org/ChangeLanguage --- Dockerfile | 5 ++++- docker-compose.yml | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7bd6a3..88bf367 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,12 @@ LABEL maintainer "Fabio Rodrigues Ribeiro " ENV USER=ff ENV GUID=1000 +ENV LANG=pt_BR.UTF-8 + # Setup locale RUN apt-get update && apt-get install -y locales \ - && localedef -i pt_BR -c -f UTF-8 -A /usr/share/locale/locale.alias pt_BR.UTF-8 + && echo "pt_BR.UTF-8 UTF-8" > /etc/locales.gen \ + && locale-gen # Install Firefox RUN apt-get upgrade -y \ diff --git a/docker-compose.yml b/docker-compose.yml index 790a65e..9d0d0b2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,6 @@ services: devices: - /dev/snd:/dev/snd environment: - - LANGUAGE=pt_BR.UTF-8 - - LC_ALL=pt_BR.UTF-8 - LANG=pt_BR.UTF-8 - DISPLAY=${DISPLAY} - XAUTHORITY=/home/ff/.Xauthority From 2134607cd1967ff966bc36a39ddd0ec25675f330 Mon Sep 17 00:00:00 2001 From: Diego Rabatone Oliveira Date: Sat, 12 Jan 2019 11:48:38 -0200 Subject: [PATCH 54/87] Reorganizing the Dockerfile. With this reorganization we: - avoid temporary files permanently in the intermediate layers - reduce the number of layers - improve the cleanup step --- Dockerfile | 79 +++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/Dockerfile b/Dockerfile index 88bf367..25a06cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,47 +9,44 @@ ENV GUID=1000 ENV LANG=pt_BR.UTF-8 -# Setup locale -RUN apt-get update && apt-get install -y locales \ +RUN apt-get update && + apt-get install -y --no-install-recommends \ + locales \ + ca-certificates \ + wget \ + firefox-esr \ + firefox-esr-l10n-pt-br \ + libc6 \ + # libcurl4 \ + libdbus-1-3 \ + libgcc1 \ + libgdk-pixbuf2.0-0 \ + libglib2.0-0 \ + libgtk2.0-0 \ + libnss3-tools \ + libpango-1.0-0 \ + libpython2.7-minimal \ + libpython2.7-stdlib \ + # libssl1.0.0 \ + libstdc++6 \ + libx11-6 \ + libxi6 \ + openssl \ + procps \ + python-gpg \ + python-openssl \ + python2.7 \ + sed \ + sudo \ + xauth \ + zenity \ + # Setup locale && echo "pt_BR.UTF-8 UTF-8" > /etc/locales.gen \ && locale-gen - -# Install Firefox -RUN apt-get upgrade -y \ - && apt-get install -y \ - ca-certificates \ - wget \ - --no-install-recommends \ + # Downloading warsaw && mkdir -p /src \ && wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb -RUN apt-get install -y \ - firefox-esr \ - firefox-esr-l10n-pt-br \ - libc6 \ - # libcurl4 \ - libdbus-1-3 \ - libgcc1 \ - libgdk-pixbuf2.0-0 \ - libglib2.0-0 \ - libgtk2.0-0 \ - libnss3-tools \ - libpango-1.0-0 \ - libpython2.7-minimal \ - libpython2.7-stdlib \ - # libssl1.0.0 \ - libstdc++6 \ - libx11-6 \ - libxi6 \ - openssl \ - procps \ - python-gpg \ - python-openssl \ - python2.7 \ - sed \ - sudo \ - xauth \ - zenity \ - --no-install-recommends \ + # Configuring the environment && mkdir -p /home/${USER} \ && groupadd -g ${GUID} -r ${USER} \ && useradd -u ${GUID} -r -g ${USER} -G audio,video ${USER} -d /home/${USER} \ @@ -57,9 +54,11 @@ RUN apt-get install -y \ && echo 'ff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ && echo 'Defaults !requiretty' >> /etc/sudoers \ && echo root:wscef | chpasswd \ - && apt-get remove -y wget \ - && apt-get purge --auto-remove -y \ - && rm -rf /var/lib/apt/lists/* + # Cleanup + && apt remove --purge -y wget \ + && apt autoremove -y \ + && apt clean \ + && rm -rf /var/lib/apt/lists/* /var/cache/apt/* # Run Firefox as non privileged user USER ff From 0b2d5aa06312c7d714933d8aca43061226da9b36 Mon Sep 17 00:00:00 2001 From: AndresMRM Date: Wed, 6 Feb 2019 12:05:35 -0200 Subject: [PATCH 55/87] Remove LANG definition from startup.sh, it's already in Dockerfile --- startup.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/startup.sh b/startup.sh index 394a6f4..749eec6 100644 --- a/startup.sh +++ b/startup.sh @@ -1,7 +1,5 @@ #!/bin/bash -export LANG="pt_BR.UTF-8" - if [ -n "${XAUTHORITY}" ] && [ -n "${HOST_HOSTNAME}" ] then if [ "${HOSTNAME}" != "${HOST_HOSTNAME}" ] From bd339023ad29c162f57830c67f52ab3702d1c07e Mon Sep 17 00:00:00 2001 From: AndresMRM Date: Wed, 6 Feb 2019 12:07:36 -0200 Subject: [PATCH 56/87] Migrate limits definitions from v2 to v3 --- docker-compose.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9d0d0b2..d8dd921 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,8 +11,11 @@ services: - DISPLAY=${DISPLAY} - XAUTHORITY=/home/ff/.Xauthority - HOST_HOSTNAME=${HOSTNAME} - cpuset: '0' - mem_limit: 512M + deploy: + resources: + limits: + cpus: '0.50' + memory: 512M shm_size: 2g volumes: - /dev/shm:/dev/shm From 64f1f549348ee99db7507e4d1dc68cc317813ae8 Mon Sep 17 00:00:00 2001 From: AndresMRM Date: Wed, 6 Feb 2019 12:08:36 -0200 Subject: [PATCH 57/87] Fix locale file name, Dockerfile struct and chmod perms --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 25a06cb..44688c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ ENV GUID=1000 ENV LANG=pt_BR.UTF-8 -RUN apt-get update && +RUN apt-get update && \ apt-get install -y --no-install-recommends \ locales \ ca-certificates \ @@ -41,11 +41,11 @@ RUN apt-get update && xauth \ zenity \ # Setup locale - && echo "pt_BR.UTF-8 UTF-8" > /etc/locales.gen \ - && locale-gen + && echo "pt_BR.UTF-8 UTF-8" > /etc/locale.gen \ + && locale-gen \ # Downloading warsaw && mkdir -p /src \ - && wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb + && wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb \ # Configuring the environment && mkdir -p /home/${USER} \ && groupadd -g ${GUID} -r ${USER} \ @@ -67,7 +67,7 @@ USER ff VOLUME "/home/ff/Downloads" COPY startup.sh /home/ff/ -RUN chmod 744 /home/ff/startup.sh \ +RUN sudo chmod 777 /home/ff/startup.sh # Autorun Firefox -CMD [ "/home/ff/startup.sh" ] +CMD /home/ff/startup.sh From 68bf7afe2595495fdd13ca735a6e8e37271b7f89 Mon Sep 17 00:00:00 2001 From: AndresMRM Date: Wed, 6 Feb 2019 12:33:47 -0200 Subject: [PATCH 58/87] Add window class and name --- startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index 749eec6..d8563a5 100644 --- a/startup.sh +++ b/startup.sh @@ -24,4 +24,4 @@ else fi /usr/local/bin/warsaw/core \ -&& firefox -no-remote -private-window www.caixa.gov.br +&& firefox -no-remote -private-window --class CaixaEconomica --name CaixaEconomica https://www.caixa.gov.br From 08d9bc302f7e3ff4eba62dcba767f679ee44e320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 9 Feb 2019 20:29:19 -0200 Subject: [PATCH 59/87] Return to default permissions --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 44688c4..1ac816b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,7 +67,7 @@ USER ff VOLUME "/home/ff/Downloads" COPY startup.sh /home/ff/ -RUN sudo chmod 777 /home/ff/startup.sh +RUN sudo chmod 744 /home/ff/startup.sh # Autorun Firefox CMD /home/ff/startup.sh From 257702533065b8476a9ecace0b46644cb9e09a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 9 Feb 2019 20:31:09 -0200 Subject: [PATCH 60/87] In dockerfile not necessary sudo --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1ac816b..8aa5a76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,7 +67,7 @@ USER ff VOLUME "/home/ff/Downloads" COPY startup.sh /home/ff/ -RUN sudo chmod 744 /home/ff/startup.sh +RUN chmod 744 /home/ff/startup.sh # Autorun Firefox CMD /home/ff/startup.sh From 1f0d6e1013d823ecbd40c570b2d468adc3c249c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 9 Feb 2019 20:58:55 -0200 Subject: [PATCH 61/87] Unify layer --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8aa5a76..4348efc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,6 +48,7 @@ RUN apt-get update && \ && wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb \ # Configuring the environment && mkdir -p /home/${USER} \ + && chmod 744 /home/ff/startup.sh \ && groupadd -g ${GUID} -r ${USER} \ && useradd -u ${GUID} -r -g ${USER} -G audio,video ${USER} -d /home/${USER} \ && chown -R ${GUID}:${GUID} /home/${USER} \ @@ -67,7 +68,6 @@ USER ff VOLUME "/home/ff/Downloads" COPY startup.sh /home/ff/ -RUN chmod 744 /home/ff/startup.sh # Autorun Firefox CMD /home/ff/startup.sh From a1673d60c802eef883f462fd809c0a210912a2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 9 Feb 2019 21:00:19 -0200 Subject: [PATCH 62/87] Move layer --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4348efc..abe6d97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ ENV GUID=1000 ENV LANG=pt_BR.UTF-8 +COPY startup.sh /home/ff/ + RUN apt-get update && \ apt-get install -y --no-install-recommends \ locales \ @@ -67,7 +69,5 @@ USER ff # Add volume for recipes PDFs VOLUME "/home/ff/Downloads" -COPY startup.sh /home/ff/ - # Autorun Firefox CMD /home/ff/startup.sh From 2169dedd786d5fc97de8fb68576ba9fe52e7d685 Mon Sep 17 00:00:00 2001 From: The Gitter Badger Date: Sat, 16 Mar 2019 19:20:23 +0000 Subject: [PATCH 63/87] Add Gitter badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cfe8308..152b6d2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # wscef-docker +[![Join the chat at https://gitter.im/farribeiro/wscef-docker](https://badges.gitter.im/farribeiro/wscef-docker.svg)](https://gitter.im/farribeiro/wscef-docker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + Warsaw in docker container. Warsaw is a security module, a.k.a Guardião, for brazilian internet banking. This project is compatible of Banco do Brasil and Caixa Econômica Federal. From 2049aae9d91589f0c1e8e57b18fa86f01a2477ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Dick=20Smiderle?= Date: Fri, 10 Jan 2020 16:54:39 -0300 Subject: [PATCH 64/87] Upgrade to buster Python 3 Simplify dependencies Install warsaw not in startup.sh, but via Dockerfile, and always start warsaw Now possible to use enviroment variables to set bankfiles and Xauthority with .env file --- .env.dist | 3 +++ Dockerfile | 43 +++++++++++++++++++++++-------------------- docker-compose.yml | 2 +- startup.sh | 13 +++++++------ 4 files changed, 34 insertions(+), 27 deletions(-) create mode 100644 .env.dist diff --git a/.env.dist b/.env.dist new file mode 100644 index 0000000..28674e4 --- /dev/null +++ b/.env.dist @@ -0,0 +1,3 @@ +HOSTNAME=Enterprise +XAUTHORITY=~/.Xauthority +BANKFILES=~/Investimentos \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index abe6d97..4208094 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Run Warsaw in a container # Base docker image -FROM debian:stretch-slim +FROM debian:buster-slim LABEL maintainer "Fabio Rodrigues Ribeiro " ENV USER=ff @@ -18,27 +18,28 @@ RUN apt-get update && \ wget \ firefox-esr \ firefox-esr-l10n-pt-br \ - libc6 \ + # libc6 \ # libcurl4 \ - libdbus-1-3 \ - libgcc1 \ - libgdk-pixbuf2.0-0 \ - libglib2.0-0 \ - libgtk2.0-0 \ + # libdbus-1-3 \ + # libgcc1 \ + # libgdk-pixbuf2.0-0 \ + # libglib2.0-0 \ + # libgtk2.0-0 \ libnss3-tools \ - libpango-1.0-0 \ - libpython2.7-minimal \ - libpython2.7-stdlib \ + # libpango-1.0-0 \ + # libpython2.7-minimal \ + # libpython2.7-stdlib \ # libssl1.0.0 \ - libstdc++6 \ - libx11-6 \ - libxi6 \ + # libstdc++6 \ + # libx11-6 \ + # libxi6 \ openssl \ procps \ python-gpg \ python-openssl \ - python2.7 \ - sed \ + # python2.7 \ + python3 \ + # sed \ sudo \ xauth \ zenity \ @@ -56,12 +57,14 @@ RUN apt-get update && \ && chown -R ${GUID}:${GUID} /home/${USER} \ && echo 'ff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ && echo 'Defaults !requiretty' >> /etc/sudoers \ - && echo root:wscef | chpasswd \ - # Cleanup - && apt remove --purge -y wget \ - && apt autoremove -y \ + && echo root:wscef | chpasswd + +RUN apt -y install /src/GBPCEFwr64.deb || true +# Cleanup +RUN apt autoremove -y \ && apt clean \ - && rm -rf /var/lib/apt/lists/* /var/cache/apt/* + && rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ + && apt remove --purge -y wget || true # Run Firefox as non privileged user USER ff diff --git a/docker-compose.yml b/docker-compose.yml index d8dd921..f9489b6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,5 +21,5 @@ services: - /dev/shm:/dev/shm - /tmp/.X11-unix:/tmp/.X11-unix - ${XAUTHORITY}:/tmp/.docker.xauth:ro - - ~/BankFiles:/home/ff/Downloads + - ${BANKFILES}:/home/ff/Downloads - /etc/machine-id:/etc/machine-id:ro diff --git a/startup.sh b/startup.sh index d8563a5..9135373 100644 --- a/startup.sh +++ b/startup.sh @@ -15,13 +15,14 @@ fi if [ ! -d ~/.mozilla ] then # sudo dbus-uuidgen > /etc/machine-id \ - firefox -no-remote -CreateProfile default \ - && sudo apt update \ - && sudo apt -y upgrade \ - && sudo apt -y install /src/GBPCEFwr64.deb -else - sudo /etc/init.d/warsaw start + firefox -no-remote -CreateProfile default # \ + # && sudo apt update \ + # && sudo apt -y upgrade \ + # && sudo apt -y install /src/GBPCEFwr64.deb +#else + # sudo /etc/init.d/warsaw start fi +sudo /etc/init.d/warsaw start /usr/local/bin/warsaw/core \ && firefox -no-remote -private-window --class CaixaEconomica --name CaixaEconomica https://www.caixa.gov.br From 79dd56dd3412c1b41041ba4ca27afdc0cab61806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Fri, 10 Jan 2020 18:45:43 -0300 Subject: [PATCH 65/87] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 152b6d2..1ea7f9c 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,10 @@ since environments and volumes are set on `docker-compose.yml`. **PS:** Reports that the warsaw daemon for CEF works for the BB site: https://github.com/farribeiro/wscef-docker/issues/9#issuecomment-308244119 -**PS:** you must run Docker using a GNU/Linux distro running xorg. -Be aware some installations may run another display server, such as Wayland. +~~**PS:** you must run Docker using a GNU/Linux distro running xorg. +Be aware some installations may run another display server, such as Wayland.~~ + +The latest firefox release support wayland, not tested with xauth **PS:** The root password is **wscef** by https://github.com/farribeiro/wscef-docker/issues/29 From 7b3532fd66edf85ae221ff832dee42109307ea64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Dick=20Smiderle?= Date: Sat, 11 Jan 2020 03:48:34 -0300 Subject: [PATCH 66/87] Install warsaw in startup.sh: generate hashes in container, not in image, and less layers --- Dockerfile | 9 +++------ startup.sh | 8 ++++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4208094..7e6c984 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,14 +57,11 @@ RUN apt-get update && \ && chown -R ${GUID}:${GUID} /home/${USER} \ && echo 'ff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ && echo 'Defaults !requiretty' >> /etc/sudoers \ - && echo root:wscef | chpasswd - -RUN apt -y install /src/GBPCEFwr64.deb || true -# Cleanup -RUN apt autoremove -y \ + && echo root:wscef | chpasswd \ + && apt autoremove -y \ && apt clean \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ - && apt remove --purge -y wget || true + && apt remove --purge -y wget # Run Firefox as non privileged user USER ff diff --git a/startup.sh b/startup.sh index 9135373..f79c59c 100644 --- a/startup.sh +++ b/startup.sh @@ -15,10 +15,10 @@ fi if [ ! -d ~/.mozilla ] then # sudo dbus-uuidgen > /etc/machine-id \ - firefox -no-remote -CreateProfile default # \ - # && sudo apt update \ - # && sudo apt -y upgrade \ - # && sudo apt -y install /src/GBPCEFwr64.deb + firefox -no-remote -CreateProfile default \ + && sudo apt update \ + && sudo apt -y upgrade \ + && sudo apt -y install /src/GBPCEFwr64.deb #else # sudo /etc/init.d/warsaw start fi From ace0251336cfd9ee5ae8125a0e54adfc3893ba88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Dick=20Smiderle?= Date: Sat, 11 Jan 2020 04:43:58 -0300 Subject: [PATCH 67/87] Minor cleanups --- .env.dist | 2 +- Dockerfile | 5 +++-- startup.sh | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.env.dist b/.env.dist index 28674e4..448bfba 100644 --- a/.env.dist +++ b/.env.dist @@ -1,3 +1,3 @@ HOSTNAME=Enterprise XAUTHORITY=~/.Xauthority -BANKFILES=~/Investimentos \ No newline at end of file +BANKFILES=~/Investimentos diff --git a/Dockerfile b/Dockerfile index 7e6c984..10304e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,10 +58,11 @@ RUN apt-get update && \ && echo 'ff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ && echo 'Defaults !requiretty' >> /etc/sudoers \ && echo root:wscef | chpasswd \ + # Cleanup + && apt remove --purge -y wget \ && apt autoremove -y \ && apt clean \ - && rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ - && apt remove --purge -y wget + && rm -rf /var/lib/apt/lists/* /var/cache/apt/* # Run Firefox as non privileged user USER ff diff --git a/startup.sh b/startup.sh index f79c59c..d8cfbf6 100644 --- a/startup.sh +++ b/startup.sh @@ -16,9 +16,9 @@ if [ ! -d ~/.mozilla ] then # sudo dbus-uuidgen > /etc/machine-id \ firefox -no-remote -CreateProfile default \ - && sudo apt update \ - && sudo apt -y upgrade \ - && sudo apt -y install /src/GBPCEFwr64.deb + && sudo apt update \ + && sudo apt -y upgrade \ + && sudo apt -y install /src/GBPCEFwr64.deb #else # sudo /etc/init.d/warsaw start fi From ca5a10abce7572d6b0edfb81f96fc7fc44c62fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 11 Jan 2020 08:50:27 -0300 Subject: [PATCH 68/87] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ea7f9c..ffaeb3a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ since environments and volumes are set on `docker-compose.yml`. **To force replace the container:** `docker-compose up --force-recreate`, thanks[1] **PS:** Reports that the warsaw daemon for CEF works for the BB site: -https://github.com/farribeiro/wscef-docker/issues/9#issuecomment-308244119 +https://github.com/farribeiro/wscef-docker/issues/9#issuecomment-308244119 and Sicredi ( https://github.com/farribeiro/wscef-docker/pull/72#issuecomment-573244722) ~~**PS:** you must run Docker using a GNU/Linux distro running xorg. Be aware some installations may run another display server, such as Wayland.~~ From 47653aa42e57982a017022bdbf8b6a86140b9e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 11 Jan 2020 08:57:21 -0300 Subject: [PATCH 69/87] Update docker-compose.yml --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index f9489b6..615a8a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: - /dev/snd:/dev/snd environment: - LANG=pt_BR.UTF-8 + - TZ=${TZ} - DISPLAY=${DISPLAY} - XAUTHORITY=/home/ff/.Xauthority - HOST_HOSTNAME=${HOSTNAME} From 57ff72a470b464c58a88e3326becb42931138180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 11 Jan 2020 09:29:01 -0300 Subject: [PATCH 70/87] Use env variable --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 10304e5..4bb8180 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ RUN apt-get update && \ xauth \ zenity \ # Setup locale - && echo "pt_BR.UTF-8 UTF-8" > /etc/locale.gen \ + && echo ${LANG} > /etc/locale.gen \ && locale-gen \ # Downloading warsaw && mkdir -p /src \ From e1c846a05f3eac3c3fa12b8538fd65a69ee19bd3 Mon Sep 17 00:00:00 2001 From: Fabio Beneditto Date: Sat, 11 Jan 2020 11:41:28 -0300 Subject: [PATCH 71/87] Sucessfully test on Sicredi (plus update README.md) --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ffaeb3a..50dd7e0 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,13 @@ [![Join the chat at https://gitter.im/farribeiro/wscef-docker](https://badges.gitter.im/farribeiro/wscef-docker.svg)](https://gitter.im/farribeiro/wscef-docker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) Warsaw in docker container. Warsaw is a security module, a.k.a Guardião, for brazilian -internet banking. This project is compatible of Banco do Brasil and Caixa Econômica -Federal. +internet banking. This project is compatible of Banco do Brasil, Caixa Econômica +Federal and Sicredi. ## Pre-requisites - Docker and Docker-Compose of your distro. +- Set BANKFILES variable (as `export BANKFILES=/home/ff/Downloads/Bankfiles`) to prevent volume creation error ## Instructions @@ -27,8 +28,9 @@ since environments and volumes are set on `docker-compose.yml`. **To force replace the container:** `docker-compose up --force-recreate`, thanks[1] -**PS:** Reports that the warsaw daemon for CEF works for the BB site: -https://github.com/farribeiro/wscef-docker/issues/9#issuecomment-308244119 and Sicredi ( https://github.com/farribeiro/wscef-docker/pull/72#issuecomment-573244722) +**PS:** Reports that the warsaw daemon for CEF works for: +- BB site: https://github.com/farribeiro/wscef-docker/issues/9#issuecomment-308244119 +- Sicredi ( https://github.com/farribeiro/wscef-docker/pull/72#issuecomment-573244722) ~~**PS:** you must run Docker using a GNU/Linux distro running xorg. Be aware some installations may run another display server, such as Wayland.~~ From 1206835d18afa54129f3cbc98a22b5c31e07c258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 11 Jan 2020 11:44:06 -0300 Subject: [PATCH 72/87] Blank lines --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4bb8180..15d9301 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,9 +2,11 @@ # Base docker image FROM debian:buster-slim + LABEL maintainer "Fabio Rodrigues Ribeiro " ENV USER=ff + ENV GUID=1000 ENV LANG=pt_BR.UTF-8 From 8974f924bab72b538a0de48025aff6b284806657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 11 Jan 2020 17:41:16 -0300 Subject: [PATCH 73/87] Create .dockerignore --- .dockerignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ + From 76920c1100e47e011ae288d5508665be090c5986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 11 Jan 2020 17:44:49 -0300 Subject: [PATCH 74/87] Add ignore files --- .dockerignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 8b13789..0df4777 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,2 @@ - +/var/cache/apt/* +/var/lib/apt/lists/* From c86e953346eb18146c0586a23cd4abbbe3faaa0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 11 Jan 2020 17:46:00 -0300 Subject: [PATCH 75/87] Remove step --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 15d9301..e0cfa73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,8 +63,7 @@ RUN apt-get update && \ # Cleanup && apt remove --purge -y wget \ && apt autoremove -y \ - && apt clean \ - && rm -rf /var/lib/apt/lists/* /var/cache/apt/* + && apt clean # Run Firefox as non privileged user USER ff From 40adb01180df1aa97ac27bcf0d98fc9d6c499d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 11 Jan 2020 17:51:11 -0300 Subject: [PATCH 76/87] Change CMD to ENTRYPOINT --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e0cfa73..6439873 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,4 +72,4 @@ USER ff VOLUME "/home/ff/Downloads" # Autorun Firefox -CMD /home/ff/startup.sh +ENTRYPOINT /home/ff/startup.sh From 73c6cd8164421b323a54eb32ed01690bcb886008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sun, 12 Jan 2020 07:50:58 -0300 Subject: [PATCH 77/87] acresenta tzdata --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 10304e5..1b95df5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ COPY startup.sh /home/ff/ RUN apt-get update && \ apt-get install -y --no-install-recommends \ locales \ + tzdata \ ca-certificates \ wget \ firefox-esr \ From e18e999c8d4f50a20898b22deccf0c99857d3795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Wed, 17 Jun 2020 15:58:03 -0300 Subject: [PATCH 78/87] Add a disclaimer --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 50dd7e0..1e49aa0 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Federal and Sicredi. - Docker and Docker-Compose of your distro. - Set BANKFILES variable (as `export BANKFILES=/home/ff/Downloads/Bankfiles`) to prevent volume creation error +- For transparency, privacy and security NEVER USE ANY PRE-BUILT DOCKER IMAGE FROM THIS PROJECT. Obtain a copy of the source code of this repository, check the content and build your own image. ## Instructions From 5642884403da85eebe67949f06d0a0f1f3da0a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Wed, 17 Jun 2020 16:06:07 -0300 Subject: [PATCH 79/87] Remove instruction --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 1e49aa0..c3b8a55 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,6 @@ since environments and volumes are set on `docker-compose.yml`. **To build:** `docker-compose build wscef` -**To pulling existing image:** `docker-compose pull` - **To first run:** `docker-compose run --name wscef wscef` **To other runs:** `docker start -i -a wscef` From 6adb1b73d992b6ae1f71188bea0660f7267ddfe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Thu, 18 Jun 2020 15:46:46 -0300 Subject: [PATCH 80/87] Layering for local porpouse --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b19543..7a43ab9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,15 +45,15 @@ RUN apt-get update && \ # sed \ sudo \ xauth \ - zenity \ + zenity # Setup locale - && echo ${LANG} > /etc/locale.gen \ - && locale-gen \ + RUN echo ${LANG} > /etc/locale.gen \ + && locale-gen # Downloading warsaw - && mkdir -p /src \ - && wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb \ + RUN mkdir -p /src \ + && wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb # Configuring the environment - && mkdir -p /home/${USER} \ + RUN mkdir -p /home/${USER} \ && chmod 744 /home/ff/startup.sh \ && groupadd -g ${GUID} -r ${USER} \ && useradd -u ${GUID} -r -g ${USER} -G audio,video ${USER} -d /home/${USER} \ From 8ce2a546fd89c54138eaea19b9c6836da204e5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Thu, 18 Jun 2020 15:49:21 -0300 Subject: [PATCH 81/87] Remove ident --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7a43ab9..029f9c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,13 +47,13 @@ RUN apt-get update && \ xauth \ zenity # Setup locale - RUN echo ${LANG} > /etc/locale.gen \ +RUN echo ${LANG} > /etc/locale.gen \ && locale-gen # Downloading warsaw - RUN mkdir -p /src \ +RUN mkdir -p /src \ && wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb # Configuring the environment - RUN mkdir -p /home/${USER} \ +RUN mkdir -p /home/${USER} \ && chmod 744 /home/ff/startup.sh \ && groupadd -g ${GUID} -r ${USER} \ && useradd -u ${GUID} -r -g ${USER} -G audio,video ${USER} -d /home/${USER} \ From 907ed840040a4a8dadcbb26f6232e06fe460dc1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Thu, 18 Jun 2020 15:54:12 -0300 Subject: [PATCH 82/87] Remove wget and Docker downloads the warsaw --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 029f9c1..d099009 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,6 @@ RUN apt-get update && \ locales \ tzdata \ ca-certificates \ - wget \ firefox-esr \ firefox-esr-l10n-pt-br \ # libc6 \ @@ -50,8 +49,8 @@ RUN apt-get update && \ RUN echo ${LANG} > /etc/locale.gen \ && locale-gen # Downloading warsaw -RUN mkdir -p /src \ - && wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb +RUN mkdir -p /src +ADD wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb # Configuring the environment RUN mkdir -p /home/${USER} \ && chmod 744 /home/ff/startup.sh \ From 4515ff1c8a875255ba74e647cd98295c1c961f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Thu, 18 Jun 2020 15:55:32 -0300 Subject: [PATCH 83/87] Remove unused packages --- Dockerfile | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b19543..64ba800 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,28 +21,12 @@ RUN apt-get update && \ wget \ firefox-esr \ firefox-esr-l10n-pt-br \ - # libc6 \ - # libcurl4 \ - # libdbus-1-3 \ - # libgcc1 \ - # libgdk-pixbuf2.0-0 \ - # libglib2.0-0 \ - # libgtk2.0-0 \ libnss3-tools \ - # libpango-1.0-0 \ - # libpython2.7-minimal \ - # libpython2.7-stdlib \ - # libssl1.0.0 \ - # libstdc++6 \ - # libx11-6 \ - # libxi6 \ openssl \ procps \ python-gpg \ python-openssl \ - # python2.7 \ python3 \ - # sed \ sudo \ xauth \ zenity \ From 559a08b2dc75464798ed7d36c62fd61f487548c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Thu, 18 Jun 2020 15:58:07 -0300 Subject: [PATCH 84/87] Remove wget setence --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d099009..acef965 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,7 @@ RUN echo ${LANG} > /etc/locale.gen \ && locale-gen # Downloading warsaw RUN mkdir -p /src -ADD wget https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb -O /src/GBPCEFwr64.deb +ADD https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb /src/GBPCEFwr64.deb # Configuring the environment RUN mkdir -p /home/${USER} \ && chmod 744 /home/ff/startup.sh \ From e3e2bc5d6d81f6bae3dfb6e64b3b06c1d9cf8047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Sat, 20 Jun 2020 21:24:20 -0300 Subject: [PATCH 85/87] Remove unused command --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index acef965..6d22af4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,6 @@ RUN mkdir -p /home/${USER} \ && echo 'Defaults !requiretty' >> /etc/sudoers \ && echo root:wscef | chpasswd \ # Cleanup - && apt remove --purge -y wget \ && apt autoremove -y \ && apt clean From 5a4204f5eb88772efe68454d598d3fb2a8e63114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Rodrigues=20Ribeiro?= Date: Fri, 26 Jun 2020 19:21:01 -0300 Subject: [PATCH 86/87] Update LANG env var --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 467ef5c..88ad1fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ ENV USER=ff ENV GUID=1000 -ENV LANG=pt_BR.UTF-8 +ENV LANG="pt_BR.UTF-8 UTF-8" COPY startup.sh /home/ff/ From 0b21aac83199c23b6976301a6ab32123b5adb44e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Werlang?= Date: Thu, 9 Jul 2020 01:35:44 -0300 Subject: [PATCH 87/87] Improve general security - Prefer setpriv over sudo - Setup init process - Remove unneeded capabilities & privileges - Pass untrusted X11 cookie directly to firefox --- Dockerfile | 19 ++++++++----------- docker-compose.yml | 17 +++++++++++------ root.sh | 6 ++++++ startup.sh | 31 ++++++++----------------------- 4 files changed, 33 insertions(+), 40 deletions(-) create mode 100644 root.sh diff --git a/Dockerfile b/Dockerfile index 88ad1fc..590b9df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,6 @@ ENV GUID=1000 ENV LANG="pt_BR.UTF-8 UTF-8" -COPY startup.sh /home/ff/ - RUN apt-get update && \ apt-get install -y --no-install-recommends \ locales \ @@ -26,7 +24,6 @@ RUN apt-get update && \ python-gpg \ python-openssl \ python3 \ - sudo \ xauth \ zenity # Setup locale @@ -37,22 +34,22 @@ RUN mkdir -p /src ADD https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb /src/GBPCEFwr64.deb # Configuring the environment RUN mkdir -p /home/${USER} \ - && chmod 744 /home/ff/startup.sh \ && groupadd -g ${GUID} -r ${USER} \ && useradd -u ${GUID} -r -g ${USER} -G audio,video ${USER} -d /home/${USER} \ && chown -R ${GUID}:${GUID} /home/${USER} \ - && echo 'ff ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ - && echo 'Defaults !requiretty' >> /etc/sudoers \ - && echo root:wscef | chpasswd \ # Cleanup && apt autoremove -y \ && apt clean -# Run Firefox as non privileged user -USER ff +RUN apt -y install /src/GBPCEFwr64.deb || : + +COPY root.sh /usr/local/bin/ +COPY startup.sh /usr/local/bin/ +RUN chmod 700 /usr/local/bin/root.sh \ + && chmod 755 /usr/local/bin/startup.sh -# Add volume for recipes PDFs +# Add volume for receipts PDFs VOLUME "/home/ff/Downloads" # Autorun Firefox -ENTRYPOINT /home/ff/startup.sh +ENTRYPOINT /usr/local/bin/root.sh diff --git a/docker-compose.yml b/docker-compose.yml index 615a8a9..291add4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,23 @@ -version: '3' +version: '3.7' services: wscef: container_name: wscef image: farribeiro/wscef-docker build: . - devices: - - /dev/snd:/dev/snd + init: true + cap_drop: + - ALL + cap_add: + - SETUID + - SETGID + - AUDIT_WRITE + - DAC_OVERRIDE + security_opt: + - no-new-privileges:true environment: - LANG=pt_BR.UTF-8 - TZ=${TZ} - DISPLAY=${DISPLAY} - - XAUTHORITY=/home/ff/.Xauthority - - HOST_HOSTNAME=${HOSTNAME} deploy: resources: limits: @@ -19,7 +25,6 @@ services: memory: 512M shm_size: 2g volumes: - - /dev/shm:/dev/shm - /tmp/.X11-unix:/tmp/.X11-unix - ${XAUTHORITY}:/tmp/.docker.xauth:ro - ${BANKFILES}:/home/ff/Downloads diff --git a/root.sh b/root.sh new file mode 100644 index 0000000..edd1807 --- /dev/null +++ b/root.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +/etc/init.d/warsaw start + +# Run Firefox as non privileged user +setpriv --reuid=ff --regid=ff --init-groups --inh-caps=-all --reset-env env DISPLAY=$DISPLAY LANG=$LANG TZ=$TZ startup.sh diff --git a/startup.sh b/startup.sh index d8cfbf6..e94a0a4 100644 --- a/startup.sh +++ b/startup.sh @@ -1,28 +1,13 @@ #!/bin/bash -if [ -n "${XAUTHORITY}" ] && [ -n "${HOST_HOSTNAME}" ] -then - if [ "${HOSTNAME}" != "${HOST_HOSTNAME}" ] - then - [ -f ${XAUTHORITY} ] || touch ${XAUTHORITY} - xauth add ${HOSTNAME}/unix${DISPLAY} . \ - $(xauth -f /tmp/.docker.xauth list ${HOST_HOSTNAME}/unix${DISPLAY} | awk '{ print $NF }') - else - cp /tmp/.docker.xauth ${XAUTHORITY} - fi -fi +runx() { + XAUTHORITY=/tmp/auth "$@" +} -if [ ! -d ~/.mozilla ] -then - # sudo dbus-uuidgen > /etc/machine-id \ - firefox -no-remote -CreateProfile default \ - && sudo apt update \ - && sudo apt -y upgrade \ - && sudo apt -y install /src/GBPCEFwr64.deb -#else - # sudo /etc/init.d/warsaw start -fi -sudo /etc/init.d/warsaw start +cp /tmp/.docker.xauth /tmp/auth +runx xauth add ${HOSTNAME}/unix${DISPLAY} . $(runx xauth list | awk '$1 !~ /localhost/ {print $3; exit}') +runx xauth generate $DISPLAY . untrusted timeout 0 /usr/local/bin/warsaw/core \ -&& firefox -no-remote -private-window --class CaixaEconomica --name CaixaEconomica https://www.caixa.gov.br +&& runx firefox -no-remote -CreateProfile default \ +&& runx firefox -no-remote -private-window --class CaixaEconomica --name CaixaEconomica https://www.caixa.gov.br