This article describes how to use the TrustedFiscalService as a Docker Container.
Prerequisite
- Docker support has been available since version 1.2.5.
- Knowledge in the operation of Docker, specifically Docker volumes
Information
The Docker image is no longer available at http://www.retailforce.cloud/downloads but at hub.docker.com.
The image can be loaded from docker hub with the following command:
docker pull retailforce/trusted-fiscal-service:latest
To reach the rest service, you need to map port 7678 (or 7677 for HTTPS) in the Docker container.
Volume Creation
Before running the Docker container, create the volumes to ensure that data persists beyond the lifecycle of the container:
docker volume create fiscal-service-data docker volume create fiscal-service-config
Start command
The Docker container can then be started using the following command:
docker run --name trusted-fiscal-service -p 7678:7678 -d -v fiscal-service-data:/usr/share/RetailForce -v fiscal-service-config:/app/Config retailforce/trusted-fiscal-service:latest
Extracting Data from the Container
To retrieve files and logs created or used by RetailForce from the Docker container, follow these steps:
- Create a directory at your chosen location:
mkdir /path/to/your/local/destination/RetailForce_Directory
- Copy the directories:
docker cp trusted-fiscal-service:/usr/share/RetailForce /path/to/your/local/destination/RetailForce_Directory/fiscal-service-data docker cp trusted-fiscal-service:/app/Config /path/to/your/local/destination/RetailForce_Directory/fiscal-service-config
Note: If changes have occurred after you exported the data to the desktop, you will need to run these commands again to get the updated data.
Update from version before 1.2.13
In the previous versions, the configuration from the container was not mapped in the start command, so the file must be copied from the container beforehand (e.g. in a volume that was created beforehand):
docker cp trusted-fiscal-service:/app/Config/fiscalService.config.json fiscal-service-config
Accessing the Service
Once the container is running, you should be able to access the service at the following URL:
http://localhost:7678/swagger/index.html
Comments
0 comments
Please sign in to leave a comment.