Simplify Dockerfile to use pentacent/keila base directly

This commit is contained in:
Andreas Dueren
2025-06-20 10:22:29 -06:00
parent 197d10ae2b
commit 90e7f6b2e9
2 changed files with 14 additions and 16 deletions

View File

@ -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