Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile fails to start #70

Open
athamour1 opened this issue Apr 15, 2022 · 1 comment
Open

Dockerfile fails to start #70

athamour1 opened this issue Apr 15, 2022 · 1 comment

Comments

@athamour1
Copy link

Dockerfile crashes when it pulls the dependencies, maybe the packets are deprecated, I will try to find what's wrong.
The log that I get is the following

error messages
❯ docker build .
Sending build context to Docker daemon  1.071MB
Step 1/11 : FROM kstaken/apache2
 ---> 2dde0ff8b71b
Step 2/11 : LABEL name "my-docker-deployment"
 ---> Using cache
 ---> ff0426b04dc4
Step 3/11 : RUN apt-get update && apt-get install -y php5 curl git zip libapache2-mod-php5 php5-mysql php5-cli && apt-get clean && rm -rf /var/lib/apt/lists/*
 ---> Running in 0666894d0f55
Ign http://archive.ubuntu.com precise InRelease
Ign http://archive.ubuntu.com precise Release.gpg
Ign http://archive.ubuntu.com precise Release
Ign http://archive.ubuntu.com precise/main TranslationIndex
Err http://archive.ubuntu.com precise/main amd64 Packages
  404  Not Found [IP: 185.125.190.39 80]
Err http://archive.ubuntu.com precise/main i386 Packages
  404  Not Found [IP: 185.125.190.39 80]
Ign http://archive.ubuntu.com precise/main Translation-en
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/main/binary-amd64/Packages  404  Not Found [IP: 185.125.190.39 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/main/binary-i386/Packages 404 Not Found [IP: 185.125.190.39 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update && apt-get install -y php5 curl git zip libapache2-mod-php5 php5-mysql php5-cli && apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

@davidg251
Copy link

Hi there.

I used the above Dockerfile. When I go for example to http://localhost/api/?background=0D8ABC&color=fff. It doesn't work. But using that URI in an img src field, it does work.

FROM php:7.3.10-apache

WORKDIR /var/www/html

COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
COPY Utils Utils
COPY api api
COPY assets assets
COPY index.html index.html
COPY composer.json composer.json
COPY composer.lock composer.lock

RUN mkdir -p cache && chmod 777 cache
RUN apt-get update -y  \
    && apt-get install -y \
        libpng-dev \
        libzip-dev \
        libfreetype6-dev \
        libjpeg-dev \
        libmcrypt-dev

RUN docker-php-ext-install iconv \
    && docker-php-ext-configure gd \
        --enable-gd-native-ttf \
        --with-freetype-dir=/usr/include/freetype2 \
        --with-png-dir=/usr/include \
        --with-jpeg-dir=/usr/include \
    && docker-php-ext-install gd \
    && docker-php-ext-enable gd
RUN docker-php-ext-install zip mbstring

RUN rm -rf vendor/ && composer install

EXPOSE 80
EXPOSE 44

This Dockerfile should be cleaner. I will do this tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants