Help mi pls with my first Dockerfile

Hi, I have working prototype:

// docker.compose.yml

        image: wyveo/nginx-php-fpm:php81

// up
docker-compose up -d

// go inside container
docker exec -it myname bash

// install Amplify
API_KEY='cfa4492dd12312312313201' sh ./

This is working.

But every time I restart container I have to reinstall Amplify.

So I want to make Image with installed Amplify.

// Dockerfile

FROM wyveo/nginx-php-fpm:php81

RUN wget 

RUN API_KEY='cfa44921231231231301' sh ./ -y

// make image

docker build -t johndoe/nginx-phpfpm81-amplify

But this image is not working. It seems like “amplify-agent.service” is not running. If I install it manually (first YML) it will start amplify-agent after installation. But if I create Image this amplify-agent is not running.

At least that is my theory.

Never mind, I got it working by copying GitHub - nginxinc/docker-nginx-amplify: Official NGINX and Amplify Dockerfiles

You have to start the service. Use either CMD or ENTRYPOINT