Skip to content

This is for Taiwan e-mask and tax Docker image repository

Notifications You must be signed in to change notification settings

peter279k/emask-tax-docker

Repository files navigation

emask-tax-docker

Introduction

  • This is a Docker image repository for building emask and tax systems. (口罩預購系統與線上報稅系統)
  • It includes some features and they're as follows:
    • EZ100PU card driver
    • pcsc_scan and car scanner tool
    • A NHIIC client daemon. (It's for Taiwan Health Card)
    • A Personal certificate card client daemon. (It's for MOICA Citizen Digital Certificate of Taiwan R.O.C. (PKI)
    • Firefox web browser. The version is 75.0. (It's deprecated because the Firefox web browser usually have unexpected core dumped frequently....)
    • Google Chrome web browser. (The current stable version is 81.0.4044.122 at this time.)

Usage

  • Using following command to download Docker image:
docker pull peter279k/emask-tax-docker:latest
  • Download the start.sh from this repository and it can run this command:
  • Then execute ./start.sh directly.
  • It will present the Google Chrome web browser window and have three tabs about following URLs:
  • And enjoy it!

Repository file structures

  • docker_build.sh, a bash shell script and the usage is as follows:
    • ./docker_build.sh, run Docker image building with cached Docker building steps,
    • ./docker_build.sh --no-cache, run Docker image building from first steps to last steps on Dockerfile.
  • NHIICC_Install.sh, this will be executed during Docker image building and it's part of NHIICC client daemon installation.
  • run.sh, this bash shell script will be copied to Docker image and it's the entry point during Docker container running.
  • start.sh, this bash shell script can help user to execute Docker image as container easily. And it can execute this script directly.
  • smartcard_list.txt, this bash shell script is to let pcscd card scanner be easy to identify plugged card information.

Trouble Shooting

  • It will happen known error I found:
    • The Firefox web browser will be closed unexpectedly with core dumped at some moments.
      • This will not happen because this Docker image uses the Google Chrome web browser instead.
    • The error message is as follows:
......
line 43:    40 Bus error               (core dumped) firefox ${emask_url} ${tax_url}
......
  • This is not usual error, and it doesn't have current solution to be resolved.
  • At this moment, the current solution is to run ./start.sh again.
  • If this error happens frequently, I recommend using ./start.sh google-chrome-stable to execute Google Chrome web browser.
  • Another known error is as follows:
......
PC/SC device scanner
V 1.5.2 (c) 2001-2017, Ludovic Rousseau <ludovic.rousseau@free.fr>
Using reader plug'n play mechanism
Scanning present readers...
Waiting for the first reader...
......
  • This above error happens because the card device scanner is not detected or lost scanning connection from PC/SC device scanner.
  • The current solution is:
    • Firstly, close the web browser and ensure the Docker container is not running.
    • Secondly. Unplugging the card reader device and plugging this device again.
    • Lastly, running the ./start.sh shell script again and let Docker container be restarted again.
    • If it presents following message, it will be successful to resolve card device reader scanning/detecting issue.
......
PC/SC device scanner
V 1.5.2 (c) 2001-2017, Ludovic Rousseau <ludovic.rousseau@free.fr>
Using reader plug'n play mechanism
Scanning present readers...
0: CASTLES EZ100PU 00 00

Thu Apr 23 18:08:48 2020
 Reader 0: CASTLES EZ100PU 00 00
  Card state: Card removed,
......

Logs

  • HiPKILocalSignServerApp and NHIIC client daemons logs are stored as files inside running Docker container. Their file paths are as follows:
    • /tmp/HiPKILocalSignServerApp.log
    • /tmp/NHIICC.log

Special Thanks

It's inspired by personal-income-tax-docker, and thanks for @chihchun :).

References

There're many references to help this Docker image to be completed :).

中文使用指南

About

This is for Taiwan e-mask and tax Docker image repository

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published