From 90e7f6b2e90acadef32a28f2e39cfc67689f2d71 Mon Sep 17 00:00:00 2001 From: Andreas Dueren Date: Fri, 20 Jun 2025 10:22:29 -0600 Subject: [PATCH] Simplify Dockerfile to use pentacent/keila base directly --- Dockerfile | 28 +++++++++++++--------------- start.sh | 2 +- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 667eb8f..947621a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,19 @@ -FROM cloudron/base:4.2.0 +FROM pentacent/keila:0.14 -# Use Keila's prebuilt image as base for the release -FROM pentacent/keila:0.14 as keila-build +# Install Cloudron requirements +USER root +RUN addgroup --gid 1000 cloudron && adduser --disabled-password --gecos "" --uid 1000 --gid 1000 cloudron -FROM cloudron/base:4.2.0 - -# Install runtime dependencies including Erlang -RUN apt-get update \ - && apt-get install -y postgresql-client erlang-base erlang-crypto erlang-ssl erlang-inets \ +# Install additional packages +RUN apt-get update && apt-get install -y \ + nginx \ + postgresql-client \ + sudo \ && rm -rf /var/lib/apt/lists/* -# Create directories -RUN mkdir -p /app/code /app/data - -# Copy Keila from build stage -COPY --from=keila-build /opt/app /tmp/keila-release +# Setup directories +RUN mkdir -p /app/code /app/data /tmp/nginx \ + && chown -R cloudron:cloudron /app/code /app/data # Copy configuration files COPY start.sh /app/code/start.sh @@ -22,8 +21,7 @@ COPY nginx.conf /etc/nginx/sites-available/default COPY nginx_main.conf /etc/nginx/nginx.conf # Set permissions -RUN chmod +x /app/code/start.sh \ - && chown -R cloudron:cloudron /app/code /app/data /tmp/keila-release +RUN chmod +x /app/code/start.sh WORKDIR /app/code diff --git a/start.sh b/start.sh index 2284eda..2e86c31 100644 --- a/start.sh +++ b/start.sh @@ -6,7 +6,7 @@ echo "Starting Keila on Cloudron" # Copy Keila release to /app/data on first run if [[ ! -d "/app/data/keila" ]]; then echo "==> Initializing Keila installation" - cp -r /tmp/keila-release /app/data/keila + cp -r /opt/app /app/data/keila chown -R cloudron:cloudron /app/data/keila fi