Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A3 certificates support #23

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# Run Warsaw in a container

# Base docker image
FROM debian:buster-slim

LABEL maintainer "Fabio Rodrigues Ribeiro <[email protected]>"

ADD \
# https://s3-sa-east-1.amazonaws.com/shared-www.validcertificadora.com.br/libjbig0_2.0-2_amd64.deb \
https://s3-sa-east-1.amazonaws.com/shared-www.validcertificadora.com.br/libtiff4_3.9.6-6ubuntu1_amd64.deb \
# https://s3-sa-east-1.amazonaws.com/shared-www.validcertificadora.com.br/fontconfig-config_2.9.0-7_all.deb \
# https://s3-sa-east-1.amazonaws.com/shared-www.validcertificadora.com.br/libfontconfig1_2.9.0-7_amd64.deb \
https://s3-sa-east-1.amazonaws.com/shared-www.validcertificadora.com.br/libwxbase2.8-0_2.8.12.1-6ubuntu2_amd64.deb \
https://s3-sa-east-1.amazonaws.com/shared-www.validcertificadora.com.br/libwxgtk2.8-0_2.8.12.1-6ubuntu2_amd64.deb \
# https://s3-sa-east-1.amazonaws.com/shared-www.validcertificadora.com.br/libpcsclite1_1.8.5-1ubuntu1_amd64.deb \
# https://s3-sa-east-1.amazonaws.com/shared-www.validcertificadora.com.br/libccid_1.4.7-1_amd64.deb \
http://www.digitalsigncertificadora.com.br/repositorio/downloads/SafeSignIC3.0.116-x86_64-ub14-tc-admin.deb \
/src/

ENV USER=ff

ENV GUID=1000
Expand All @@ -25,14 +36,22 @@ RUN apt-get update && \
python-openssl \
python3 \
xauth \
zenity
# Setup locale
zenity \
opensc \
libopensc-openssl \
pcscd \
pcsc-tools

# Setup locale
RUN echo ${LANG} > /etc/locale.gen \
&& locale-gen
# Downloading warsaw

# Downloading warsaw
RUN mkdir -p /src

ADD https://cloud.gastecnologia.com.br/gas/diagnostico/warsaw_setup_64.deb /src/GBPCEFwr64.deb
# Configuring the environment

# Configuring the environment
RUN mkdir -p /home/${USER} \
&& groupadd -g ${GUID} -r ${USER} \
&& useradd -u ${GUID} -r -g ${USER} -G audio,video ${USER} -d /home/${USER} \
Expand All @@ -44,7 +63,9 @@ RUN mkdir -p /home/${USER} \
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

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
memory: 512M
shm_size: 2g
volumes:
- /dev/bus/usb:/dev/bus/usb
- /tmp/.X11-unix:/tmp/.X11-unix
- ${XAUTHORITY}:/tmp/.docker.xauth:ro
- ${BANKFILES}:/home/ff/Downloads
Expand Down
1 change: 1 addition & 0 deletions root.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

/etc/init.d/warsaw start
/etc/init.d/pcscd 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