I need to run an old project which needs php 5.6 and mysql 5.5. Inorder to accomblish this I have created a docker but below errors occured on docker compose. when I tried with php 7.3 it works fine but able to install 5.6
E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-
amd64/Packages 404 Not Found
E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-
amd64/Packages 404 Not Found
E: Failed to fetch http://security.debian.org/debian-
security/dists/stretch/updates/main/binary-amd64/Packages 404 Not Found
[IP:151.101.130.132 80]
E: Some index files failed to download. They have been ignored, or old ones used
instead.
ERROR: Service 'app' failed to build: The command '/bin/sh -c apt-get update && apt-
get install -y git .....' returned a non-zero code: 100
Below are the files I used docker-compose.yml
version: '2'
services:
# The Application
app:
build:
context: ./
dockerfile: app.dockerfile
working_dir: /var/www
volumes:
- ./public:/var/www
- ./php.ini:/usr/local/etc/php/php.ini
environment:
- "DB_PORT=3306"
- "DB_HOST=database"
# The Web Server
web:
build:
context: ./
dockerfile: web.dockerfile
working_dir: /var/www
volumes_from:
- app
ports:
- 8080:80
# The Database
database:
image: mysql:5.7-debian
volumes:
- dbdata:/var/lib/mysql
environment:
- "MYSQL_DATABASE=homestead"
- "MYSQL_USER=homestead"
- "MYSQL_PASSWORD=secret"
- "MYSQL_ROOT_PASSWORD=secret"
ports:
- "33061:3306"
volumes:
dbdata:
app.dockerfile
FROM php:5.6.15-cli
RUN apt-get update && apt-get install -y git zip unzip
RUN docker-php-ext-install mysqli pdo pdo_mysql
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin
--filename=composer
web.dockerfile
FROM nginx:1.10
ADD vhost.conf /etc/nginx/conf.d/default.conf