mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-06 01:25:28 +00:00
add docker file, updated version from stage1
This commit is contained in:
parent
4f8bbb1a31
commit
d14de915b2
244
Dockerfile.debug
244
Dockerfile.debug
@ -1,132 +1,114 @@
|
|||||||
#########################################################################################################
|
#########################################################################################################
|
||||||
# Build protoc
|
# debug build preparation
|
||||||
#########################################################################################################
|
#########################################################################################################
|
||||||
FROM gcc:7.5 as protoc_build
|
|
||||||
RUN git clone --recurse-submodules https://github.com/protocolbuffers/protobuf.git
|
From conanio/gcc9 as build_debug_preparation
|
||||||
WORKDIR /protobuf
|
USER root
|
||||||
|
#RUN apt-get update && \
|
||||||
RUN git checkout v3.9.1
|
# apt-get install -y --no-install-recommends gcc g++ && \
|
||||||
RUN ./autogen.sh
|
# apt-get autoclean && \
|
||||||
RUN ./configure --enable-static=yes
|
# apt-get autoremove && \
|
||||||
RUN make -j$(grep processor /proc/cpuinfo | wc -l)
|
# apt-get clean && \
|
||||||
RUN make check
|
# rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
CMD ["./protobuf"]
|
ENV DOCKER_WORKDIR="/code"
|
||||||
|
|
||||||
#########################################################################################################
|
|
||||||
# debug build preparation
|
#VOLUME /root/.conan
|
||||||
#########################################################################################################
|
|
||||||
|
RUN mkdir -p ${DOCKER_WORKDIR}
|
||||||
From conanio/gcc7 as debug_preparation
|
WORKDIR ${DOCKER_WORKDIR}
|
||||||
|
|
||||||
ENV DOCKER_WORKDIR="/code"
|
COPY ./dependencies ./dependencies
|
||||||
|
COPY ./conanfile.txt ./conanfile.txt
|
||||||
USER root
|
|
||||||
|
RUN cd dependencies/mariadb-connector-c && \
|
||||||
COPY --from=protoc_build /protobuf/src/.libs/protoc /usr/bin/
|
mkdir build && \
|
||||||
COPY --from=protoc_build /protobuf/src/.libs/libprotobuf.so.20.0.1 /usr/lib/libprotobuf.so.20
|
cd build && \
|
||||||
COPY --from=protoc_build /protobuf/src/.libs/libprotoc.so.20.0.1 /usr/lib/libprotoc.so.20
|
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_SSL=OFF ..
|
||||||
COPY --from=protoc_build /protobuf/src/google/protobuf/*.proto /usr/include/google/protobuf/
|
|
||||||
COPY --from=protoc_build /protobuf/src/google/protobuf/*.h /usr/include/google/protobuf/
|
|
||||||
|
RUN mkdir build && \
|
||||||
#VOLUME /root/.conan
|
cd build && \
|
||||||
|
conan install .. --build=missing -s build_type=Debug
|
||||||
RUN mkdir -p ${DOCKER_WORKDIR}
|
|
||||||
WORKDIR ${DOCKER_WORKDIR}
|
#########################################################################################################
|
||||||
|
# debug build proto and grpc
|
||||||
COPY ./dependencies ./dependencies
|
#########################################################################################################
|
||||||
COPY ./conanfile.txt ./conanfile.txt
|
From build_debug_preparation as proto_grpc
|
||||||
|
|
||||||
RUN ls -la
|
ENV DOCKER_WORKDIR="/code"
|
||||||
RUN cd dependencies/iroha-ed25519 && \
|
WORKDIR ${DOCKER_WORKDIR}
|
||||||
ls -la && \
|
|
||||||
mkdir build && \
|
COPY ./CMakeLists.txt .
|
||||||
cd build && \
|
RUN cd build && \
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Debug -DEDIMPL=ref10 -DHASH=sha2_sphlib -DRANDOM=bcryptgen -DBUILD=STATIC && \
|
cmake -DCMAKE_BUILD_TYPE=Debug .. && \
|
||||||
make -j$(grep processor /proc/cpuinfo | wc -l)
|
make -j${CPU_COUNT} protoc grpc_cpp_plugin
|
||||||
|
|
||||||
RUN cd dependencies/mariadb-connector-c && \
|
#########################################################################################################
|
||||||
mkdir build && \
|
# parse proto and gettext
|
||||||
cd build && \
|
#########################################################################################################
|
||||||
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_SSL=OFF ..
|
From proto_grpc as proto_parse
|
||||||
|
|
||||||
|
ENV DOCKER_WORKDIR="/code"
|
||||||
#RUN chmod +x compile_proto.sh
|
WORKDIR ${DOCKER_WORKDIR}
|
||||||
#RUN chmod +x compile_pot.sh
|
|
||||||
#RUN ls -la
|
RUN mkdir src && \
|
||||||
#RUN ./compile_pot.sh
|
cd src && \
|
||||||
#RUN ./compile_proto.sh
|
mkdir cpp
|
||||||
RUN mkdir build && \
|
COPY ./src/proto ./src/proto
|
||||||
cd build && \
|
COPY ./unix_parse_proto.sh .
|
||||||
conan install .. --build=missing -s build_type=Debug
|
|
||||||
|
RUN chmod +x unix_parse_proto.sh && \
|
||||||
|
./unix_parse_proto.sh
|
||||||
|
|
||||||
#########################################################################################################
|
|
||||||
# Build debug
|
#########################################################################################################
|
||||||
#########################################################################################################
|
# Build debug
|
||||||
From debug_preparation as debug
|
#########################################################################################################
|
||||||
|
From proto_parse as build_debug
|
||||||
ENV DOCKER_WORKDIR="/code"
|
|
||||||
|
ENV DOCKER_WORKDIR="/code"
|
||||||
USER root
|
|
||||||
#VOLUME /root/.conan
|
USER root
|
||||||
|
WORKDIR ${DOCKER_WORKDIR}
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y --no-install-recommends gdb && \
|
COPY ./src/cpp ./src/cpp
|
||||||
apt-get autoclean && \
|
COPY ./src/LOCALE ./src/LOCALE
|
||||||
apt-get autoremove && \
|
COPY ./compile_pot.sh .
|
||||||
apt-get clean && \
|
COPY ./files_to_translate.txt .
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
RUN chmod +x compile_pot.sh && \
|
||||||
#COPY --from=protoc_build /protobuf/src/.libs/libprotobuf.so.20.0.1 /usr/lib/libprotobuf.so.20
|
./compile_pot.sh
|
||||||
#COPY --from=protoc_build /protobuf/src/google/protobuf/*.h /usr/include/google/protobuf/
|
|
||||||
|
RUN cd build && \
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Debug .. && \
|
||||||
#COPY --from=debug_preparation /code /code
|
make -j$(nproc)
|
||||||
#COPY --from=debug_preparation /home/conan /home/conan
|
|
||||||
#RUN ls -la /home/conan/.conan
|
CMD bash
|
||||||
COPY . .
|
|
||||||
WORKDIR ${DOCKER_WORKDIR}
|
#########################################################################################################
|
||||||
|
# run debug
|
||||||
#RUN ls -la
|
#########################################################################################################
|
||||||
#RUN cat build/conanbuildinfo.cmake
|
FROM ubuntu:latest as login_server_debug
|
||||||
RUN chmod +x compile_proto.sh
|
|
||||||
RUN chmod +x compile_pot.sh
|
WORKDIR "/usr/bin"
|
||||||
#RUN ls -la
|
|
||||||
RUN ./compile_pot.sh
|
#RUN apt-get update && \
|
||||||
RUN ./compile_proto.sh
|
# apt-get install -y --no-install-recommends gdb && \
|
||||||
RUN cd build && \
|
# apt-get autoclean && \
|
||||||
cmake -DCMAKE_BUILD_TYPE=Debug .. && \
|
# apt-get autoremove && \
|
||||||
make -j$(grep processor /proc/cpuinfo | wc -l)
|
# apt-get clean && \
|
||||||
|
# rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
#########################################################################################################
|
VOLUME /var/log/grd_login
|
||||||
# run debug
|
|
||||||
#########################################################################################################
|
COPY --from=build_debug /code/build/bin/Gradido_LoginServer /usr/bin/
|
||||||
FROM ubuntu:latest as login_server_debug
|
COPY --from=build_debug /code/build/lib/libmariadb.so.3 /usr/lib/
|
||||||
|
#COPY --from=build_debug /code/build/lib/libPocoNetSSLd.so.64 /usr/lib/libPocoNetSSLd.so.64
|
||||||
WORKDIR "/usr/bin"
|
RUN chmod +x /usr/bin/Gradido_LoginServer
|
||||||
|
EXPOSE 1200
|
||||||
#RUN apt-get update && \
|
EXPOSE 1201
|
||||||
# apt-get install -y --no-install-recommends gdb && \
|
|
||||||
# apt-get autoclean && \
|
#CMD gdb -ex=r Gradido_LoginServer
|
||||||
# apt-get autoremove && \
|
|
||||||
# apt-get clean && \
|
|
||||||
# rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
VOLUME /var/log/grd_login
|
|
||||||
|
|
||||||
COPY --from=debug /code/build/bin/Gradido_LoginServer /usr/bin/
|
|
||||||
COPY --from=debug /code/build/lib/libmariadb.so.3 /usr/lib/
|
|
||||||
#COPY start_after_mysql.sh .
|
|
||||||
RUN chmod +x /usr/bin/Gradido_LoginServer
|
|
||||||
EXPOSE 1200
|
|
||||||
EXPOSE 1201
|
|
||||||
#ENTRYPOINT ["/usr/bin/Gradido_LoginServer"]
|
|
||||||
# Wait on mariadb to started
|
|
||||||
#CMD ["sleep 5", "/usr/bin/Gradido_LoginServer"]
|
|
||||||
#RUN chmod +x ./start_after_mysql.sh
|
|
||||||
#ENTRYPOINT ["/usr/bin/Gradido_LoginServer"]
|
|
||||||
#CMD gdb -ex=r Gradido_LoginServer
|
|
||||||
CMD Gradido_LoginServer
|
CMD Gradido_LoginServer
|
||||||
Loading…
x
Reference in New Issue
Block a user