Skip to content

Commit

Permalink
docker: swap back to debian base image
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol authored May 14, 2024
1 parent 596c22b commit 10b1c4e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 13 deletions.
38 changes: 30 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ RUN apt-get update -y && \
make && \
make install

FROM alpine:3.19
FROM debian:bookworm-slim

ARG ARCH

Expand All @@ -60,23 +60,45 @@ ENV PGID=1000

# install dependencies

RUN apk update && \
apk add --no-cache \
RUN apt-get update -y && \
apt-get install -y \
ca-certificates \
tzdata \
wget \
make \
git \
cron \
gettext \
gnupg \
mysql-client \
postgresql16-client \
gnupg2 \
default-mysql-client \
postgresql-client \
nginx \
supervisor
supervisor \
gnustep-make \
libcurl4 \
libgcc-s1 \
libglib2.0-0 \
libgnustep-base1.28 \
libldap-2.5-0 \
libmemcached11 \
libsodium23 \
libzip4 \
liboath0 \
libobjc4 \
libpq5 \
libssl3 \
libxml2 \
zlib1g \
postgresql-client-common \
postgresql-common \
mysql-common && \
rm -rf /var/lib/apt/lists/*

# add config, binaries, libraries, and init files

COPY --from=builder /usr/local/sbin/* /usr/sbin/
COPY --from=builder /usr/local/lib/* /usr/lib/
COPY --from=builder /usr/local/lib/sogo/* /usr/lib/sogo/
COPY --from=builder /usr/local/lib/GNUstep/* /usr/lib/GNUstep/
COPY --from=builder /tmp/SOGo/Scripts/sogo-default /etc/default/sogo
COPY --from=builder /tmp/SOGo/Scripts/sogo.cron /etc/cron.d/sogo
COPY --from=builder /tmp/SOGo/Scripts/sogo.conf /etc/sogo/sogo.conf
Expand Down
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -e

# Set process UID and GID at runtime
if [ -n "$PUID" ] && [ -n "$PGID" ]; then
addgroup -g $PGID sogo
adduser -u $PUID -G sogo -D sogo
groupmod -g $PGID sogo
usermod -u $PUID -g $PGID sogo
fi

# create mandatory dirs and enforce owner+mode
Expand All @@ -29,7 +29,7 @@ if [ -z "$(ls -A /etc/sogo/sogo.conf.d)" ]; then
else
# Generate config file from yaml folder
echo "Generating sogo.conf from /etc/sogo/sogo.conf.d YAML files..."
source /opt/config_parser.sh
. /opt/config_parser.sh
GenerateConfigFile
fi

Expand Down
4 changes: 2 additions & 2 deletions supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ stdout_logfile_maxbytes=0
redirect_stderr=true

[program:nginx]
command=/bin/sh -c "/usr/sbin/nginx -g 'daemon off;'"
command=/bin/sh -c "nginx -g 'daemon off;'"
user=root
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true

[program:crond]
command=/bin/sh -c "/usr/sbin/crond -f -L 15"
command=/bin/sh -c "cron -f -L 15"
autostart=true
autorestart=true
user=root
Expand Down

0 comments on commit 10b1c4e

Please sign in to comment.