Skip to content

Instantly share code, notes, and snippets.

@guibranco
Last active July 13, 2024 10:59
Show Gist options
  • Save guibranco/9342f83c5e51b7ec85d9046c652d1074 to your computer and use it in GitHub Desktop.
Save guibranco/9342f83c5e51b7ec85d9046c652d1074 to your computer and use it in GitHub Desktop.
Docker file for PHP 5.6 with Apache, MySQL extension, GD2 and Apache mod_rewrite enabled
FROM php:5.6-apache
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \
-e 's|security.debian.org|archive.debian.org/|g' \
-e '/stretch-updates/d' /etc/apt/sources.list
RUN apt-get update
RUN apt-get install --yes --force-yes cron g++ gettext libicu-dev openssl libc-client-dev libkrb5-dev libxml2-dev libfreetype6-dev libgd-dev libmcrypt-dev bzip2 libbz2-dev libtidy-dev libcurl4-openssl-dev libz-dev libmemcached-dev libxslt-dev
RUN a2enmod rewrite
RUN docker-php-ext-install mysql
RUN docker-php-ext-enable mysql
RUN docker-php-ext-configure gd --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr
RUN docker-php-ext-install gd
COPY ./ /var/www/html/
@Martzy303
Copy link

W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.2.132 80]
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: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update' returned a non-zero code: 100

For me it fails when running apt-get update

@guibranco
Copy link
Author

@Martzy303 fixed! Try again please 😃

@samansupriadi
Copy link

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment