build ixhttpd on docker with centos7
This commit is contained in:
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
|
Reference in New Issue
Block a user