build ixhttpd on docker with centos7
This commit is contained in:
		@@ -1 +1 @@
 | 
			
		||||
docker/Dockerfile.alpine
 | 
			
		||||
docker/Dockerfile.centos7_httpd
 | 
			
		||||
							
								
								
									
										33
									
								
								docker/Dockerfile.centos7_httpd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								docker/Dockerfile.centos7_httpd
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
FROM centos:7 as build
 | 
			
		||||
 | 
			
		||||
RUN yum install -y gcc-c++ make zlib-devel redhat-rpm-config
 | 
			
		||||
 | 
			
		||||
RUN groupadd app && useradd -g app app
 | 
			
		||||
RUN chown -R app:app /opt
 | 
			
		||||
RUN chown -R app:app /usr/local
 | 
			
		||||
 | 
			
		||||
# There is a bug in CMake where we cannot build from the root top folder
 | 
			
		||||
# So we build from /opt
 | 
			
		||||
COPY --chown=app:app . /opt
 | 
			
		||||
WORKDIR /opt
 | 
			
		||||
 | 
			
		||||
USER app
 | 
			
		||||
RUN [ "make", "httpd_linux" ]
 | 
			
		||||
RUN [ "rm", "-rf", "build" ]
 | 
			
		||||
 | 
			
		||||
FROM centos:8 as runtime
 | 
			
		||||
 | 
			
		||||
RUN groupadd app && useradd -g app app
 | 
			
		||||
COPY --chown=app:app --from=build /usr/local/bin/ixhttpd /usr/local/bin/ixhttpd
 | 
			
		||||
RUN chmod +x /usr/local/bin/ixhttpd
 | 
			
		||||
RUN ldd /usr/local/bin/ixhttpd
 | 
			
		||||
 | 
			
		||||
# Copy source code for gcc
 | 
			
		||||
COPY --chown=app:app --from=build /opt /opt
 | 
			
		||||
 | 
			
		||||
# Now run in usermode
 | 
			
		||||
USER app
 | 
			
		||||
WORKDIR /home/app
 | 
			
		||||
 | 
			
		||||
ENTRYPOINT ["ixhttpd"]
 | 
			
		||||
EXPOSE 9999
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
 *  Buid with make httpd
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <ixwebsocket/IXHttpServer.h>
 | 
			
		||||
#include "IXHttpServer.h"
 | 
			
		||||
#include <sstream>
 | 
			
		||||
#include <iostream>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								makefile
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								makefile
									
									
									
									
									
								
							@@ -170,7 +170,7 @@ autobahn_report:
 | 
			
		||||
	cp -rvf ~/sandbox/reports/clients/* ../bsergean.github.io/IXWebSocket/autobahn/
 | 
			
		||||
 | 
			
		||||
httpd:
 | 
			
		||||
	clang++ --std=c++11 --stdlib=libc++ httpd.cpp \
 | 
			
		||||
	clang++ --std=c++11 --stdlib=libc++ -Iixwebsocket httpd.cpp \
 | 
			
		||||
		ixwebsocket/IXSelectInterruptFactory.cpp \
 | 
			
		||||
		ixwebsocket/IXCancellationRequest.cpp \
 | 
			
		||||
		ixwebsocket/IXSocketTLSOptions.cpp \
 | 
			
		||||
@@ -192,7 +192,7 @@ httpd:
 | 
			
		||||
		ixwebsocket/apple/IXSetThreadName_apple.cpp -lz
 | 
			
		||||
 | 
			
		||||
httpd_linux:
 | 
			
		||||
	g++ --std=c++11 httpd.cpp \
 | 
			
		||||
	g++ --std=c++11 -o /usr/local/bin/ixhttpd httpd.cpp -Iixwebsocket \
 | 
			
		||||
		ixwebsocket/IXSelectInterruptFactory.cpp \
 | 
			
		||||
		ixwebsocket/IXCancellationRequest.cpp \
 | 
			
		||||
		ixwebsocket/IXSocketTLSOptions.cpp \
 | 
			
		||||
@@ -211,7 +211,7 @@ httpd_linux:
 | 
			
		||||
		ixwebsocket/IXConnectionState.cpp \
 | 
			
		||||
		ixwebsocket/IXUrlParser.cpp \
 | 
			
		||||
		ixwebsocket/IXSelectInterrupt.cpp \
 | 
			
		||||
		ixwebsocket/apple/IXSetThreadName_linux.cpp -lz
 | 
			
		||||
		ixwebsocket/linux/IXSetThreadName_linux.cpp -lz -lpthread
 | 
			
		||||
 | 
			
		||||
# For the fork that is configured with appveyor
 | 
			
		||||
rebase_upstream:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user