Skip to content

Commit

Permalink
compile: link rootfs/bin
Browse files Browse the repository at this point in the history
  • Loading branch information
huapox committed Nov 4, 2023
1 parent ff974f5 commit eeef1aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions compile/build-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,15 @@ COPY --from=tiger ${STATIC} /rootfs${STATIC}
COPY --from=xrdp ${STATIC} /rootfs${STATIC}

# clear lib,share/man; create links
RUN find /rootfs/usr/local/static -type d |egrep "/share/man$|xrdp/lib$" | \
RUN mkdir -p /rootfs/bin /rootfs/sbin; \
find /rootfs/usr/local/static -type d |egrep "/share/man$|xrdp/lib$" | \
while read one; do du -sh $one; rm -rf $one; done; \
\
find /rootfs/usr/local/static -type f |grep "/sbin/" |sort | \
while read one; do ls -lh $one; ln -s $one /sbin/; done; \
while read one; do ls -lh $one; ln -s $one /rootfs/sbin/; done; \
\
find /rootfs/usr/local/static -type f |grep "/bin/" |sort | \
while read one; do ls -lh $one; ln -s $one /bin/; done;
while read one; do ls -lh $one; ln -s $one /rootfs/bin/; done;
RUN find /rootfs${STATIC} -type f |sort |wc
RUN find /rootfs${STATIC} -type f |sort

0 comments on commit eeef1aa

Please sign in to comment.