Simplify Dockerfile to use pentacent/keila base directly
This commit is contained in:
28
Dockerfile
28
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
|
# Install Cloudron requirements
|
||||||
FROM pentacent/keila:0.14 as keila-build
|
USER root
|
||||||
|
RUN addgroup --gid 1000 cloudron && adduser --disabled-password --gecos "" --uid 1000 --gid 1000 cloudron
|
||||||
|
|
||||||
FROM cloudron/base:4.2.0
|
# Install additional packages
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
# Install runtime dependencies including Erlang
|
nginx \
|
||||||
RUN apt-get update \
|
postgresql-client \
|
||||||
&& apt-get install -y postgresql-client erlang-base erlang-crypto erlang-ssl erlang-inets \
|
sudo \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Create directories
|
# Setup directories
|
||||||
RUN mkdir -p /app/code /app/data
|
RUN mkdir -p /app/code /app/data /tmp/nginx \
|
||||||
|
&& chown -R cloudron:cloudron /app/code /app/data
|
||||||
# Copy Keila from build stage
|
|
||||||
COPY --from=keila-build /opt/app /tmp/keila-release
|
|
||||||
|
|
||||||
# Copy configuration files
|
# Copy configuration files
|
||||||
COPY start.sh /app/code/start.sh
|
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
|
COPY nginx_main.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
RUN chmod +x /app/code/start.sh \
|
RUN chmod +x /app/code/start.sh
|
||||||
&& chown -R cloudron:cloudron /app/code /app/data /tmp/keila-release
|
|
||||||
|
|
||||||
WORKDIR /app/code
|
WORKDIR /app/code
|
||||||
|
|
||||||
|
2
start.sh
2
start.sh
@ -6,7 +6,7 @@ echo "Starting Keila on Cloudron"
|
|||||||
# Copy Keila release to /app/data on first run
|
# Copy Keila release to /app/data on first run
|
||||||
if [[ ! -d "/app/data/keila" ]]; then
|
if [[ ! -d "/app/data/keila" ]]; then
|
||||||
echo "==> Initializing Keila installation"
|
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
|
chown -R cloudron:cloudron /app/data/keila
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user