Skip to content

Commit

Permalink
[fix]docker: reduce the number of mirror layers
Browse files Browse the repository at this point in the history
Signed-off-by: Cyber-SiKu <[email protected]>
  • Loading branch information
Cyber-SiKu committed Feb 14, 2023
1 parent 1a44544 commit 1e7a0d9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 27 deletions.
14 changes: 3 additions & 11 deletions curvefs/docker/debian9/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
FROM opencurvedocker/curve-base:debian9
ENV TZ=Asia/Shanghai
RUN mkdir -p /curvefs /etc/curvefs /core /etc/curve
COPY curvefs/client /curvefs/client
COPY curvefs/conf /curvefs/conf
COPY curvefs/etcd /curvefs/etcd
COPY curvefs/mds /curvefs/mds
COPY curvefs/metaserver /curvefs/metaserver
COPY curvefs/monitor /curvefs/monitor
COPY curvefs/tools /curvefs/tools
COPY entrypoint.sh /
COPY curvefs/tools/sbin/curvefs_tool /usr/bin
COPY curvefs /curvefs
COPY libmemcached.so libmemcached.so.11 libhashkit.so.2 /usr/lib/
RUN chmod a+x /entrypoint.sh
RUN mkdir -p /etc/curvefs /core /etc/curve && chmod a+x /entrypoint.sh \
&& cp /curvefs/tools/sbin/curvefs_tool /usr/bin
ENTRYPOINT ["/entrypoint.sh"]
19 changes: 5 additions & 14 deletions docker/debian9/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
FROM opencurvedocker/curve-base:debian9
ENV TZ=Asia/Shanghai
RUN mkdir -p /curvebs /etc/curve /etc/nebd /core
COPY curvebs/chunkserver /curvebs/chunkserver
COPY curvebs/conf /curvebs/conf
COPY curvebs/etcd /curvebs/etcd
COPY curvebs/mds /curvebs/mds
COPY curvebs/monitor /curvebs/monitor
COPY curvebs/nbd /curvebs/nbd
COPY curvebs/nebd /curvebs/nebd
COPY curvebs/playground /curvebs/playground
COPY curvebs/snapshotclone /curvebs/snapshotclone
COPY curvebs/tools /curvebs/tools
COPY entrypoint.sh /
COPY curvebs/tools/sbin/curve_ops_tool curvebs/nbd/sbin/curve-nbd /usr/bin/
RUN chmod a+x /entrypoint.sh
COPY curvebs /curvebs
RUN mkdir -p /etc/curve /etc/nebd \
&& chmod a+x /entrypoint.sh \
&& cp curvebs/tools/sbin/curve_ops_tool curvebs/nbd/sbin/curve-nbd \
&& cp curvebs/tools/sbin/curve_ops_tool /usr/bin/
ENTRYPOINT ["/entrypoint.sh"]
5 changes: 3 additions & 2 deletions docker/debian9/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM debian:9

ENV TZ=Asia/Shanghai
RUN echo "deb http://mirrors.163.com/debian/ stretch main\n" \
"deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib\n" \
"deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib\n" \
Expand Down Expand Up @@ -36,4 +36,5 @@ RUN echo "deb http://mirrors.163.com/debian/ stretch main\n" \
&& mv libetcdclient.so /usr/lib/ \
&& mv libfuse3.so libfuse3.so.3 libfuse3.so.3.10.5 libnl-3.so.200 libnl-genl-3.so.200 /usr/lib/x86_64-linux-gnu/ \
&& mv libjemalloc.so libjemalloc.so.1 libjemalloc.so.2 /usr/local/lib/ \
&& rm curve-base.tar.gz
&& rm curve-base.tar.gz \
&& mkdir -p /core

0 comments on commit 1e7a0d9

Please sign in to comment.