Build Fail After Successful Build, and Don't Execute Script

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” :sweat_smile:

So, here we go with the main files:

My render.yaml

services:
  - type: web
    name: php
    env: docker
    region: oregon
    plan: free
    branch: main

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

Well, when I try to build on Render, the build starts to build the Image (As expected.) But, after the build is SUCCESSFUL (View Logs Down), the build just fails and don’t even execute the start.sh. I’ve already tryied to add the script in the render.yaml | dockerCommand: ./start.sh, but it’s the same.

I Found the solution. Basically, I just deleted the web service from Render.com and created again. But, I’m having trouble now with Docker CMD Command Runs Many Times - General - Render

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.