Container Usage
Our docker images are designed only for standalone Docker usage. The EFR's data storage is not designed for multi-process use and cannot be used by multiple replicas at the same time. It is NOT supported in distributed environments like Kubernetes, Docker Swarm, or Nomad unless a deployment strategy is used that guarantees only one instance is running at a time.
How to use a docker image
$ docker run -itd -v /home/efsta/efrDATA:/usr/src/EFR/DATA -p 20011:5618 --restart always --device=/dev/bus/usb/001/002 --privileged efsta/efr-[country-code]:latest efr
Please note that this is only an example and must be adjusted to fulfill security and environment needs. efsta is not responsible for any kind of data loss or other damages.
Attributes and parameters
Mapping the network port
The EFR exposes port 5618, which needs to be published to access its API
-p 8090:5618
Persisting storage
The container path /usr/src/EFR/DATA needs to be mapped to a volume to persist the EFR's internal storage
-v <storage path on host>:/usr/src/EFR/DATA
Recommended attributes
We recommend to always restart the container to ensure the EFR is responsive to the POS in case of a crash or system outage.
--restart always
Country-Specific Options
Connecting smart cards (Austria)
[AT]To connect smart cards in Austria (in case of using hardware fiscalization), the USB device needs to be made accessible to the container. Additionally, depending on the host environment, the --privileged parameter may be needed to allow the Docker runtime to access the port.
--device=/dev/<serial_port> --privileged
Connected smartcards can be listed and stored in a variable in the right format with the following command on the host system:
# idevices=$(lsusb | grep -i 'gemalto|ACR39U' | awk '{print "--device=/dev/bus/usb/" $2 "/" $4}' | awk '{gsub (":","",$1); printf "%s ",$1}')
When using online signatures, this can be skipped.
Connecting to hardware TSEs (Germany)
[DE]When using a hardware TSE, the USB ports need to be made accessible to the container. Additionally, depending on the host environment, the --privileged parameter may be needed to allow the Docker runtime to access USB.
-v /dev/usb:/dev/usb --privileged
This can be skipped when using cloud TSEs.
Connecting printers (Hungary, Poland)
To connect fiscal printers in Hungary or Poland, the serial port needs to be made accessible to the container. Additionally, depending on the host environment, the --privileged parameter may be needed to allow the Docker runtime to access the port.
--device=/dev/<serial_port> --privileged
Connected serial ports can be listed with the following command on the host system:
# dmesg | grep tty

