diff --git a/Dockerfile b/Dockerfile index 2be1d12..33b5a3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,9 @@ FROM ubuntu:latest LABEL maintainer "Fabio Rodrigues Ribeiro " +ADD https://cloud.gastecnologia.com.br/cef/warsaw/install/GBPCEFwr64.deb /src/ +COPY startup.sh /home/ff/ + # Install Firefox ADD \ @@ -32,24 +35,19 @@ RUN apt-get update \ pcscd \ pcsc-tools \ --no-install-recommends \ - && apt -y install /src/*.deb \ - && apt-get purge --auto-remove -y \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /src/*.deb - -ADD https://cloud.gastecnologia.com.br/cef/warsaw/install/GBPCEFwr64.deb /src/ -COPY startup.sh /home/ff/ - -# Add ff user -RUN groupadd -g 1000 -r ff \ - && useradd -u 1000 -r -g ff -G audio,video ff \ - && mkdir -p /home/ff \ + && 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 \ - && passwd -d root + && passwd -d root \ + && apt-get purge --auto-remove -y \ + && rm -rf /var/lib/apt/lists/* # Run firefox as non privileged user USER ff +# Add volume for recipes PDFs +VOLUME "/home/ff/Downloads" + # Autorun chrome CMD [ "/home/ff/startup.sh" ] diff --git a/README.md b/README.md index 31a05cb..d80e79b 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,19 @@ -

wscef-docker

+# wscef-docker -

Warsaw in docker container

+Warsaw in docker container -

Instructions

+## Instructions -

Use the docker compose to build and run docker container, because has a -enviorments and volumes setted on a docker-compose.yml and not -needed the docker run anytime

+Use docker compose to build and run the docker container, rather than `docker run`, +since environments and volumes are set on `docker-compose.yml`. -

To build: docker-compose build wscef

+**To build:** `docker-compose build wscef` -

To run: docker-compose run --rm wscef +**To pulling existing image:** `docker-compose pull` -

PS: The xauth will broke the container if you restart or -poweroff the system, else in the same session will run ok, and not erase -it.

+**To first run:** `docker-compose run --name wscef wscef` + +**To other runs:** `docker start -a wscef` + +**PS:** you must run Docker using a GNU/Linux distro running xorg. +Be aware some installations may run another display server, such as Wayland. diff --git a/docker-compose.yml b/docker-compose.yml index f1ff3b2..1be8947 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,3 +15,4 @@ services: - /dev/shm:/dev/shm - /tmp/.X11-unix:/tmp/.X11-unix - ${XAUTHORITY}:/tmp/.docker.xauth:ro + - ~/BankFiles:/home/ff/Downloads