Hi. I’m testing the Platform, but I’m founding some errors when building with Docker.
Basically, it’s an Application where starts an PHP-FPM and NGINX in Dockerfile.
Well, what can I say? “In my machine works”
So, here we go with the main files:
My render.yaml
services:
- type: web
name: test-nginx
env: docker
region: oregon
plan: free
branch: main
envVars:
- key: PORT
value: 8000
My Dockerfile
FROM php:${PHP_VERSION:-8.2}-fpm-alpine
# > Install Dependencies
RUN apk update && apk add nginx openrc
RUN rm -rf /var/lib/apt/lists/*
RUN mkdir /run/openrc && \
touch /run/openrc/softlevel
# < Install Dependencies
# > Add NGINX Configuration
COPY docker/nginx/nginx.conf /etc/nginx/nginx.conf
RUN nginx -t
# < Add NGINX Configuration
# > Add PHP-FPM Files
COPY . /app
WORKDIR /app
# < Add PHP-FPM Files
# > Configure Start Shell Script
RUN chmod +x ./start.sh
CMD ["./start.sh"]
# < Configure Start Shell Script
My start.sh
#!/bin/sh
openrc &> /dev/null
rc-service nginx start &> /dev/null
php-fpm -D
echo "Start.sh - Started"
Well, when I try to build on Render, the build starts to build the Image and run the container (As expected.) But, after the container is running, and the CMD Script is started, something strange happens.
Basically, the Start Script run many times, and after a time, the build is failed.