mirror of
				https://github.com/Telecominfraproject/wlan-cloud-owprov.git
				synced 2025-10-31 02:27:52 +00:00 
			
		
		
		
	Adding fmtlib/fmt to image
This commit is contained in:
		| @@ -50,6 +50,7 @@ find_package(AWSSDK     REQUIRED COMPONENTS s3) | |||||||
| find_package(Poco       REQUIRED COMPONENTS Crypto JWT Net Util NetSSL Data DataSQLite) | find_package(Poco       REQUIRED COMPONENTS Crypto JWT Net Util NetSSL Data DataSQLite) | ||||||
| find_package(nlohmann_json  REQUIRED) | find_package(nlohmann_json  REQUIRED) | ||||||
| find_package(nlohmann_json_schema_validator REQUIRED) | find_package(nlohmann_json_schema_validator REQUIRED) | ||||||
|  | find_package(fmt        REQUIRED) | ||||||
|  |  | ||||||
| if(SMALL_BUILD) | if(SMALL_BUILD) | ||||||
|     find_package(Poco REQUIRED COMPONENTS Crypto JWT Net Util NetSSL Data DataSQLite) |     find_package(Poco REQUIRED COMPONENTS Crypto JWT Net Util NetSSL Data DataSQLite) | ||||||
| @@ -129,11 +130,20 @@ add_executable(owprov | |||||||
|         src/WebSocketClientServer.cpp src/WebSocketClientServer.h |         src/WebSocketClientServer.cpp src/WebSocketClientServer.h | ||||||
|         src/storage/storage_maps.cpp src/storage/storage_maps.h |         src/storage/storage_maps.cpp src/storage/storage_maps.h | ||||||
|         src/RESTAPI/RESTAPI_map_handler.cpp src/RESTAPI/RESTAPI_map_handler.h |         src/RESTAPI/RESTAPI_map_handler.cpp src/RESTAPI/RESTAPI_map_handler.h | ||||||
|         src/RESTAPI/RESTAPI_map_list_handler.cpp src/RESTAPI/RESTAPI_map_list_handler.h src/storage/storage_signup.cpp src/storage/storage_signup.h src/Signup.cpp src/Signup.h src/DeviceTypeCache.h src/storage/storage_variables.cpp src/storage/storage_variables.h src/RESTAPI/RESTAPI_variables_handler.cpp src/RESTAPI/RESTAPI_variables_handler.h src/RESTAPI/RESTAPI_variables_list_handler.cpp src/RESTAPI/RESTAPI_variables_list_handler.h src/FileDownloader.cpp src/FileDownloader.h) |         src/RESTAPI/RESTAPI_map_list_handler.cpp src/RESTAPI/RESTAPI_map_list_handler.h | ||||||
|  |         src/storage/storage_signup.cpp src/storage/storage_signup.h | ||||||
|  |         src/Signup.cpp src/Signup.h | ||||||
|  |         src/DeviceTypeCache.h | ||||||
|  |         src/storage/storage_variables.cpp src/storage/storage_variables.h | ||||||
|  |         src/RESTAPI/RESTAPI_variables_handler.cpp src/RESTAPI/RESTAPI_variables_handler.h | ||||||
|  |         src/RESTAPI/RESTAPI_variables_list_handler.cpp src/RESTAPI/RESTAPI_variables_list_handler.h | ||||||
|  |         src/FileDownloader.cpp src/FileDownloader.h) | ||||||
|  |  | ||||||
| target_link_libraries(owprov PUBLIC | target_link_libraries(owprov PUBLIC | ||||||
|         ${Poco_LIBRARIES} ${MySQL_LIBRARIES} |         ${Poco_LIBRARIES} ${MySQL_LIBRARIES} | ||||||
|         ${Boost_LIBRARIES} |         ${Boost_LIBRARIES} | ||||||
|         ${ZLIB_LIBRARIES} ${AWSSDK_LINK_LIBRARIES} |         ${ZLIB_LIBRARIES} ${AWSSDK_LINK_LIBRARIES} | ||||||
|         CppKafka::cppkafka nlohmann_json_schema_validator) |         CppKafka::cppkafka | ||||||
|  |         fmt::fmt | ||||||
|  |         nlohmann_json_schema_validator) | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										17
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								Dockerfile
									
									
									
									
									
								
							| @@ -43,6 +43,18 @@ RUN cmake .. | |||||||
| RUN make | RUN make | ||||||
| RUN make install | RUN make install | ||||||
|  |  | ||||||
|  | FROM build-base AS fmtlib-build | ||||||
|  |  | ||||||
|  | ADD https://api.github.com/repos/fmtlib/fmt/git/refs/heads/master version.json | ||||||
|  | RUN git clone https://github.com/fmtlib/git /fmtlib | ||||||
|  |  | ||||||
|  | WORKDIR /fmtlib | ||||||
|  | RUN mkdir cmake-build | ||||||
|  | WORKDIR cmake-build | ||||||
|  | RUN cmake .. | ||||||
|  | RUN make | ||||||
|  | RUN make install | ||||||
|  |  | ||||||
| FROM build-base AS aws-sdk-cpp-build | FROM build-base AS aws-sdk-cpp-build | ||||||
|  |  | ||||||
| ADD https://api.github.com/repos/aws/aws-sdk-cpp/git/refs/heads/main version.json | ADD https://api.github.com/repos/aws/aws-sdk-cpp/git/refs/heads/main version.json | ||||||
| @@ -74,6 +86,9 @@ COPY --from=json-schema-validator-build /usr/local/lib /usr/local/lib | |||||||
| COPY --from=aws-sdk-cpp-build /usr/local/include /usr/local/include | COPY --from=aws-sdk-cpp-build /usr/local/include /usr/local/include | ||||||
| COPY --from=aws-sdk-cpp-build /usr/local/lib /usr/local/lib | COPY --from=aws-sdk-cpp-build /usr/local/lib /usr/local/lib | ||||||
|  |  | ||||||
|  | COPY --from=fmtlib-build /usr/local/include /usr/local/include | ||||||
|  | COPY --from=fmtlib-build /usr/local/lib /usr/local/lib | ||||||
|  |  | ||||||
| WORKDIR /owprov | WORKDIR /owprov | ||||||
| RUN mkdir cmake-build | RUN mkdir cmake-build | ||||||
| WORKDIR /owprov/cmake-build | WORKDIR /owprov/cmake-build | ||||||
| @@ -112,6 +127,8 @@ COPY --from=aws-sdk-cpp-build /aws-sdk-cpp/cmake-build/aws-cpp-sdk-core/libaws-c | |||||||
| COPY --from=aws-sdk-cpp-build /aws-sdk-cpp/cmake-build/aws-cpp-sdk-s3/libaws-cpp-sdk-s3.so /usr/local/lib | COPY --from=aws-sdk-cpp-build /aws-sdk-cpp/cmake-build/aws-cpp-sdk-s3/libaws-cpp-sdk-s3.so /usr/local/lib | ||||||
| COPY --from=aws-sdk-cpp-build /aws-sdk-cpp/cmake-build/aws-cpp-sdk-sns/libaws-cpp-sdk-sns.so /usr/local/lib | COPY --from=aws-sdk-cpp-build /aws-sdk-cpp/cmake-build/aws-cpp-sdk-sns/libaws-cpp-sdk-sns.so /usr/local/lib | ||||||
|  |  | ||||||
|  | COPY --from=fmtlib-build /fmtlib/cmake-build/lib/* /usr/local/lib | ||||||
|  |  | ||||||
| EXPOSE 16005 17005 16105 | EXPOSE 16005 17005 16105 | ||||||
|  |  | ||||||
| ENTRYPOINT ["/docker-entrypoint.sh"] | ENTRYPOINT ["/docker-entrypoint.sh"] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 stephb9959
					stephb9959