A modified C++ Restful Server with MariaDB or MySQL access capabilities compliant with OpenShift.
10K+
cpp-rest-server is a restful server implemented in C++ using POCO libraries. it is dockerized and runs in Centos 7 container under restricted non-root privilege.
Dockerfilelatest, v1.0 (Dockerfile)cpp-rest-server is deployed to /app/webservice folder with the main application(webservice) is located at /app/webservice/bin and dynamic dependencies are located at /app/webservice/lib.
The image requires the following environment variables related to MariaDB/MySQL configuration:
mysql_host: MariaDB/MySQL host or ip, default to localhostmysql_user: database user namemysql_pass: database user passwordmysql_db: database/schema name, default is poco_webservice_schemaImage is built using the source code at https://github.com/jiangcongtao/poco_restful_webservice
The webservice process is started using non-root user cppuser (password: cppuser) with sudo capability provided in the consideration of debugging and testing convience.
Refer to Database initialization
docker run --rm -it -e mysql_host=<mysqlHost> -e mysql_user=<mysqlDbUser> -e mysql_pass=<mysqlDbUserPassword> -p 9090:9090 congtaojiang/cpp-rest-server
curl -v -X GET --header 'Accept: application/vnd.api+json' --header 'Content-type: application/vnd.api+json' http://localhost:9090
Refer to https://github.com/jiangcongtao/poco_restful_webservice
Content type
Image
Digest
Size
159.8 MB
Last updated
over 8 years ago
docker pull congtaojiang/cpp-rest-server