From the Dockerfile in the https://github.com/imohd23/aws_TerraPress/blob/master/nginx/Dockerfile repo apt-get is being called and not supported on Amazon Linux version as the specified AMI to use for the project.
https://stackoverflow.com/questions/32592956/amazon-linux-apt-get-command-not-found
Yum is supported however the version of Php being specified is not supported either....
FROM nginx:stable-perl
WORKDIR '/var/www/html'
#Install php and some resources
RUN ["apt-get","update"]
RUN ["apt-get","install","php7.3","-y"]
RUN ["apt-get","install","php7.3-cgi","-y"]
RUN ["apt-get","install","php7.3-fpm","-y"]
RUN ["apt-get","install","php-mysqlnd"]
RUN ["apt-get","install","php7.3-curl"]
RUN ["apt-get","install","php7.3-dom"]
Replacing apt-get with yum yields -
[ec2-user@ip-10-0-101-151 nginx]$ sudo docker-compose -f /home/ec2-user/aws_TerraPress/docker-compose.yaml up --build -d
Building nginx
Step 1/15 : FROM nginx:stable-perl
---> a5bbd1de97f7
Step 2/15 : WORKDIR '/var/www/html'
---> Using cache
---> a443664b1491
Step 3/15 : RUN ["yum","update"]
---> Running in e1e2edc420a7
ERROR: Service 'nginx' failed to build: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "yum": executable file not found in $PATH: unknown
From the Dockerfile in the https://github.com/imohd23/aws_TerraPress/blob/master/nginx/Dockerfile repo apt-get is being called and not supported on Amazon Linux version as the specified AMI to use for the project.
https://stackoverflow.com/questions/32592956/amazon-linux-apt-get-command-not-found
Yum is supported however the version of Php being specified is not supported either....
FROM nginx:stable-perl
WORKDIR '/var/www/html'
#Install php and some resources
RUN ["apt-get","update"]
RUN ["apt-get","install","php7.3","-y"]
RUN ["apt-get","install","php7.3-cgi","-y"]
RUN ["apt-get","install","php7.3-fpm","-y"]
RUN ["apt-get","install","php-mysqlnd"]
RUN ["apt-get","install","php7.3-curl"]
RUN ["apt-get","install","php7.3-dom"]
Replacing apt-get with yum yields -
[ec2-user@ip-10-0-101-151 nginx]$ sudo docker-compose -f /home/ec2-user/aws_TerraPress/docker-compose.yaml up --build -d
Building nginx
Step 1/15 : FROM nginx:stable-perl
---> a5bbd1de97f7
Step 2/15 : WORKDIR '/var/www/html'
---> Using cache
---> a443664b1491
Step 3/15 : RUN ["yum","update"]
---> Running in e1e2edc420a7
ERROR: Service 'nginx' failed to build: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "yum": executable file not found in $PATH: unknown