mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
update stage2 docker build orientated on stage1 docker-build
This commit is contained in:
parent
1f68d9bc66
commit
9946cc0e13
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -24,4 +24,8 @@
|
||||
[submodule "login_server/dependencies/cmake-modules"]
|
||||
path = login_server/dependencies/cmake-modules
|
||||
url = https://github.com/viaduck/cmake-modules.git
|
||||
|
||||
[submodule "community_server/src/protobuf"]
|
||||
path = community_server/src/protobuf
|
||||
url = git@github.com:gradido/gradido_protocol.git
|
||||
|
||||
|
||||
@ -1,72 +1,8 @@
|
||||
#########################################################################################################
|
||||
# debug build preparation
|
||||
#########################################################################################################
|
||||
|
||||
From conanio/gcc9 as build_debug_preparation
|
||||
USER root
|
||||
#RUN apt-get update && \
|
||||
# apt-get install -y --no-install-recommends gcc g++ && \
|
||||
# apt-get autoclean && \
|
||||
# apt-get autoremove && \
|
||||
# apt-get clean && \
|
||||
# rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV DOCKER_WORKDIR="/code"
|
||||
|
||||
|
||||
#VOLUME /root/.conan
|
||||
|
||||
RUN mkdir -p ${DOCKER_WORKDIR}
|
||||
WORKDIR ${DOCKER_WORKDIR}
|
||||
|
||||
COPY ./dependencies ./dependencies
|
||||
COPY ./conanfile.txt ./conanfile.txt
|
||||
|
||||
RUN cd dependencies/mariadb-connector-c && \
|
||||
mkdir build && \
|
||||
cd build && \
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_SSL=OFF ..
|
||||
|
||||
|
||||
RUN mkdir build && \
|
||||
cd build && \
|
||||
conan install .. --build=missing -s build_type=Debug
|
||||
|
||||
#########################################################################################################
|
||||
# debug build proto and grpc
|
||||
#########################################################################################################
|
||||
From build_debug_preparation as proto_grpc
|
||||
|
||||
ENV DOCKER_WORKDIR="/code"
|
||||
WORKDIR ${DOCKER_WORKDIR}
|
||||
|
||||
COPY ./CMakeLists.txt .
|
||||
RUN cd build && \
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug .. && \
|
||||
make -j${CPU_COUNT} protoc grpc_cpp_plugin
|
||||
|
||||
#########################################################################################################
|
||||
# parse proto and gettext
|
||||
#########################################################################################################
|
||||
From proto_grpc as proto_parse
|
||||
|
||||
ENV DOCKER_WORKDIR="/code"
|
||||
WORKDIR ${DOCKER_WORKDIR}
|
||||
|
||||
RUN mkdir src && \
|
||||
cd src && \
|
||||
mkdir cpp
|
||||
COPY ./src/proto ./src/proto
|
||||
COPY ./unix_parse_proto.sh .
|
||||
|
||||
RUN chmod +x unix_parse_proto.sh && \
|
||||
./unix_parse_proto.sh
|
||||
|
||||
|
||||
#########################################################################################################
|
||||
# Build debug
|
||||
#########################################################################################################
|
||||
From proto_parse as build_debug
|
||||
From gradido/login_dependencies:stage2 as build_debug
|
||||
|
||||
ENV DOCKER_WORKDIR="/code"
|
||||
|
||||
@ -77,6 +13,11 @@ COPY ./src/cpp ./src/cpp
|
||||
COPY ./src/LOCALE ./src/LOCALE
|
||||
COPY ./compile_pot.sh .
|
||||
COPY ./files_to_translate.txt .
|
||||
COPY ./src/proto ./src/proto
|
||||
COPY ./unix_parse_proto.sh .
|
||||
|
||||
RUN chmod +x unix_parse_proto.sh && \
|
||||
./unix_parse_proto.sh
|
||||
|
||||
RUN chmod +x compile_pot.sh && \
|
||||
./compile_pot.sh
|
||||
|
||||
56
login_server/Dockerfiles/Dockerfile.dependencies
Normal file
56
login_server/Dockerfiles/Dockerfile.dependencies
Normal file
@ -0,0 +1,56 @@
|
||||
#########################################################################################################
|
||||
# debug build preparation
|
||||
#########################################################################################################
|
||||
From conanio/gcc9 as build_debug_preparation
|
||||
USER root
|
||||
|
||||
ENV DOCKER_WORKDIR="/code"
|
||||
|
||||
RUN mkdir -p ${DOCKER_WORKDIR}
|
||||
WORKDIR ${DOCKER_WORKDIR}
|
||||
|
||||
COPY ./dependencies ./dependencies
|
||||
COPY ./conanfile.txt ./conanfile.txt
|
||||
|
||||
|
||||
RUN cd dependencies/mariadb-connector-c && \
|
||||
mkdir build && \
|
||||
cd build && \
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_SSL=OFF ..
|
||||
|
||||
|
||||
RUN mkdir build && \
|
||||
cd build && \
|
||||
conan install .. --build=missing -s build_type=Debug
|
||||
|
||||
|
||||
#########################################################################################################
|
||||
# debug build proto and grpc
|
||||
#########################################################################################################
|
||||
From build_debug_preparation as proto_grpc
|
||||
|
||||
ENV DOCKER_WORKDIR="/code"
|
||||
WORKDIR ${DOCKER_WORKDIR}
|
||||
|
||||
COPY ./CMakeLists.txt .
|
||||
RUN cd build && \
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug .. && \
|
||||
make -j${CPU_COUNT} protoc grpc_cpp_plugin
|
||||
|
||||
#########################################################################################################
|
||||
# parse proto and gettext
|
||||
#########################################################################################################
|
||||
From proto_grpc as proto_parse
|
||||
|
||||
ENV DOCKER_WORKDIR="/code"
|
||||
WORKDIR ${DOCKER_WORKDIR}
|
||||
|
||||
RUN mkdir src && \
|
||||
cd src && \
|
||||
mkdir cpp
|
||||
COPY ./src/proto ./src/proto
|
||||
COPY ./unix_parse_proto.sh .
|
||||
|
||||
RUN chmod +x unix_parse_proto.sh && \
|
||||
./unix_parse_proto.sh
|
||||
|
||||
13
login_server/Dockerfiles/build_and_run.sh
Normal file
13
login_server/Dockerfiles/build_and_run.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
./compile_proto.sh
|
||||
if [ ! -d "./build" ] ; then
|
||||
mkdir ./build
|
||||
cd build
|
||||
conan install ..
|
||||
cd ..
|
||||
fi
|
||||
cd build
|
||||
cmake ..
|
||||
make -j$(nproc) Gradido_LoginServer
|
||||
chmod +x ./bin/Gradido_LoginServer
|
||||
./bin/Gradido_LoginServer
|
||||
@ -1 +1 @@
|
||||
Subproject commit 2cc7eb2da5677404565f47eb05d8b087388dfbbe
|
||||
Subproject commit 7304f680be32915e772466ebddc5b7d3b453abd9
|
||||
Loading…
x
Reference in New Issue
Block a user