The helper container for printserver to inject all stylesheet files from an external source
1.4K
This container is a helper for the PrintServer container. It reads all printstyles from an external source and stores those files locally.
The container read files from an external source and stores them into the local folder /stylesheets. The protocols scp and git are implemented to get the files. Git will clone the data via HTTPS only.
After finishing its job, the container terminates.
In order to run this container you'll need docker installed.
Base execution without any parameter:
docker run hmediade/printserver-init:latest
To read files via scp:
docker run --mount type=bind,source=[source path to passwd file],target=/connectiondata \
--env CONNECTION_TYPE=scp \
--env STYLESHEET_USERNAME=[username] \
--env STYLESHEET_PROVIDER=[host|FQDN|IP address] \
--env STYLESHEET_SOURCEPATH=[source folder] \
hmediade/printserver-init:latest
To read files via git clone:
docker run --mount type=bind,source=[source path to passwd file],target=/connectiondata \
--env CONNECTION_TYPE=git \
--env STYLESHEET_USERNAME=[username] \
--env STYLESHEET_PROVIDER=[domain] \
--env STYLESHEET_SOURCEPATH=[URL path] \
hmediade/printserver-init:latest
To test and inspect the job:
docker run -d --name printserver-test <parameters> hmediade/printserver-init:latest sleep infinity
docker exec -it printserver-test bash
docker kill printserver-test
docker remove printserver-test
CONNECTION_TYPE - scp|git - specifies which protocol is used to retrieve the filesSTYLESHEET_PROVIDER - Identifies the remote server to get the files from. It could be one of a
STYLESHEET_SOURCEPATH - The source path to the original files. In case of scp it should be an absolute path on the remote file system. In case of git it is the path segment in the request URL.STYLESHEET_USERNAME- The authority to connect to the remote server.STYLESHEET_PASSWORD - (optional) Used only in case of git, it specifies the password for the user $STYLESHEET_USERNAME to connect to the remote server./connectiondata - That local path in the container must get a file named password in it with the password of the user $STYLESHEET_USERNAME in clear type. In case of scp, the tool sshpass is used to hand over the password to the scp command. In case of git, the password is extracted into the ENV variable STYLESHEET_PASSWORD, if that ENV variable is not set./scripts/import.sh - The job which is executed as CMD when the container executes. Depending on the
/stylesheets - The target directory where all imported files will be stored. That should be an external mount point, shared with the main printserver container.
Version 1.0.0 Initial release.
We use SemVer for versioning. For the versions available, see the tags on this repository.
Content type
Image
Digest
sha256:7f005eb6c…
Size
83.6 MB
Last updated
over 2 years ago
docker pull hmediade/printserver-init