Skip to content

Commit

Permalink
Merge branch 'master' into feature/leitor-a3
Browse files Browse the repository at this point in the history
# Conflicts:
#	Dockerfile
  • Loading branch information
farribeiro committed Jul 24, 2017
2 parents a4e8e27 + 1cccc3a commit 3f3cfa4
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 22 deletions.
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
FROM ubuntu:latest
LABEL maintainer "Fabio Rodrigues Ribeiro <[email protected]>"

COPY startup.sh /home/ff/

# Install Firefox

ADD \
Expand Down Expand Up @@ -33,23 +35,21 @@ RUN apt-get update \
pcsc-tools \
--no-install-recommends \
&& apt -y install /src/*.deb \
&& 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 \
&& apt-get purge --auto-remove -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /src/*.deb
&& rm -rf /var/lib/apt/lists/*

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 \
&& chmod 744 /home/ff/startup.sh \
&& chown -R ff:ff /home/ff \
&& passwd -d root

# Run firefox as non privileged user
USER ff

# Add volume for recipes PDFs
VOLUME "/home/ff/Downloads"

# Autorun chrome
CMD [ "/home/ff/startup.sh" ]
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
<h1>wscef-docker</h1>
# wscef-docker

<p>Warsaw in docker container</p>
Warsaw in docker container

<h2>Instructions</h2>
## Instructions

<p>Use the docker compose to build and run docker container, because has a
enviorments and volumes setted on a <code>docker-compose.yml</code> and not
needed the <code>docker run</code> anytime</p>
Use docker compose to build and run the docker container, rather than `docker run`,
since environments and volumes are set on `docker-compose.yml`.

<p><strong>To build:</strong> <code>docker-compose build wscef</code></p>
**To build:** `docker-compose build wscef`

<p><strong>To run:</strong> <code>docker-compose run --rm wscef</code>
**To pulling existing image:** `docker-compose pull`

<p><strong>PS:</strong> 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.</p>
**To first run:** `docker-compose run --name wscef wscef`

**To other runs:** `docker start -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

**PS:** you must run Docker using a GNU/Linux distro running xorg.
Be aware some installations may run another display server, such as Wayland.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ services:
- /dev/shm:/dev/shm
- /tmp/.X11-unix:/tmp/.X11-unix
- ${XAUTHORITY}:/tmp/.docker.xauth:ro
- ~/BankFiles:/home/ff/Downloads
7 changes: 7 additions & 0 deletions wscef.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Name=MyScript
GenericName=A descriptive name
Comment=Some description about your script
Exec=docker start -a wscef
Terminal=true
Type=Application

0 comments on commit 3f3cfa4

Please sign in to comment.