代码拉取完成,页面将自动刷新
同步操作将从 Eric Ling/sponge 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
FROM ubuntu:22.04
ENV TARGET_APP=server
RUN apt update
RUN apt install -y build-essential cmake libmysqlcppconn-dev
RUN mkdir -p /sponge
COPY . /sponge
# build muduo
RUN mkdir -p /sponge/dependencies/muduo/build
RUN rm -rf /sponge/dependencies/muduo/build/*
WORKDIR /sponge/dependencies/muduo/build
RUN cmake -DMUDUO_BUILD_EXAMPLES=OFF ..
RUN make -j2
RUN make install
# build hiredis
RUN mkdir -p /sponge/dependencies/hiredis/build
RUN rm -rf /sponge/dependencies/hiredis/build/*
WORKDIR /sponge/dependencies/hiredis/build
RUN cmake ..
RUN make -j2
RUN make install
# build redis-plus-plus
RUN mkdir -p /sponge/dependencies/redis-plus-plus/build
RUN rm -rf /sponge/dependencies/redis-plus-plus/build/*
WORKDIR /sponge/dependencies/redis-plus-plus/build
RUN cmake -DREDIS_PLUS_PLUS_CXX_STANDARD=11 -DREDIS_PLUS_PLUS_BUILD_STATIC=OFF -DREDIS_PLUS_PLUS_BUILD_TEST=OFF ..
RUN make -j2
RUN make install
# build sponge
RUN mkdir -p /sponge/build
RUN rm -rf /sponge/build/*
RUN rm -rf /sponge/bin/*
WORKDIR /sponge/build
RUN cmake -DCMAKE_BUILD_TYPE=release -DSPONGE_DISABLE_EXAMPLES=ON -DSPONGE_DISABLE_TESTS=ON ..
# RUN cmake -DCMAKE_BUILD_TYPE=release ..
RUN make -j2
# 修改容器中的数据库ip地址
RUN sed -i 's/localhost/mysql/g' /sponge/bin/mysql.cnf
RUN sed -i 's/localhost/redis/g' /sponge/bin/redis.cnf
WORKDIR /sponge/bin
RUN chmod +x /sponge/entrypoint.sh
ENTRYPOINT ["/sponge/entrypoint.sh"]
# CMD ["/bin/bash", "-i"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。