Skip to content

Commit

Permalink
docker: copy folders not individual files
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol authored May 15, 2024
1 parent 8ec499e commit 71602a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,10 @@ RUN apt-get update -y && \

# add config, binaries, libraries, and init files
COPY --from=builder /usr/local/sbin/ /usr/local/sbin/
COPY --from=builder /usr/local/lib/*.so /usr/local/lib/
COPY --from=builder /usr/local/lib/GNUstep/ /usr/local/lib/GNUstep/
COPY --from=builder /usr/local/lib/sogo/*.so /usr/local/lib/sogo/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/local/include/GNUstep/ /usr/local/include/GNUstep/
COPY --from=builder /usr/share/GNUstep/Makefiles/ /usr/share/GNUstep/Makefiles/
COPY --from=builder /usr/share/GNUstep/debian/ /usr/share/GNUstep/debian/
COPY --from=builder /etc/GNUstep/ /etc/GNUstep/
COPY --from=builder /tmp/SOGo/Scripts/sogo-default /etc/default/sogo
COPY --from=builder /tmp/SOGo/Scripts/sogo.cron /etc/cron.d/sogo
Expand All @@ -131,11 +130,7 @@ RUN a2enmod \
groupadd --system sogo && \
useradd --system --gid sogo sogo && \
mkdir -p /usr/lib/GNUstep/ && \
(ln -s /usr/local/lib/*.so /usr/lib/ || :) && \
(ln -s /usr/local/lib/GNUstep/* /usr/lib/GNUstep/ || :) && \
ln -s /usr/local/lib/GNUstep/Libraries/Resources /usr/lib/GNUstep/Libraries/Resources && \
ln -s /usr/local/include/GNUstep /usr/include/GNUstep && \
ln -s /usr/local/lib/sogo /usr/lib/sogo && \
ln -s /usr/local/lib/GNUstep/SOGo /usr/lib/GNUstep/SOGo && \
ln -s /usr/local/sbin/sogo-tool /usr/sbin/sogo-tool && \
ln -s /usr/local/sbin/sogo-ealarms-notify /usr/sbin/sogo-ealarms-notify && \
ln -s /usr/local/sbin/sogo-slapd-sockd /usr/sbin/sogo-slapd-sockd && \
Expand Down
10 changes: 5 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/sh

. /usr/share/GNUstep/Makefiles/GNUstep.sh

# Solve libssl bug for Mail View
if [ -z "$LD_PRELOAD" ]; then
LIBSSL_LOCATION=$(find / -type f -name "libssl.so.*" -print -quit)
LIBSSL_LOCATION=$(find / -type f -name "libssl.so.*" -print -quit 2>/dev/null)
echo "LD_PRELOAD=$LIBSSL_LOCATION" >> /etc/default/sogo
echo "LD_LIBRARY_PATH=/usr/local/lib/sogo:/usr/local/lib:$LD_LIBRARY_PATH" >> /etc/default/sogo
echo "LD_LIBRARY_PATH=/usr/local/lib/sogo:$LD_LIBRARY_PATH" >> /etc/default/sogo
export LD_PRELOAD=$LIBSSL_LOCATION
else
echo "LD_PRELOAD=$LD_PRELOAD" >> /etc/default/sogo
echo "LD_LIBRARY_PATH=/usr/local/lib/sogo:/usr/local/lib:$LD_LIBRARY_PATH" >> /etc/default/sogo
echo "LD_LIBRARY_PATH=/usr/local/lib/sogo:$LD_LIBRARY_PATH" >> /etc/default/sogo
export LD_PRELOAD=$LD_PRELOAD
fi

. /usr/share/GNUstep/Makefiles/GNUstep.sh

# Set process UID and GID at runtime
if [ -n "$PUID" ] && [ -n "$PGID" ]; then
groupmod -g $PGID sogo
Expand Down

0 comments on commit 71602a0

Please sign in to comment.