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

Chapter 2: error on build.sh #84

Closed
curia-damiano opened this issue Sep 8, 2021 · 3 comments
Closed

Chapter 2: error on build.sh #84

curia-damiano opened this issue Sep 8, 2021 · 3 comments

Comments

@curia-damiano
Copy link
Contributor

curia-damiano commented Sep 8, 2021

Running build.sh, I get the following error:

C:\_WorksNB\Docker-for-Developers\chapter2>bash build.sh
[+] Building 1.9s (12/12) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.1s
 => => transferring dockerfile: 1.05kB                                                                             0.0s
 => [internal] load .dockerignore                                                                                  0.1s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load metadata for docker.io/library/debian:latest                                                   0.0s
 => [internal] load build context                                                                                  0.1s
 => => transferring context: 5.85kB                                                                                0.1s
 => [1/8] FROM docker.io/library/debian                                                                            0.0s
 => CACHED [2/8] RUN apt-get update -qq >/dev/null && apt-get install -y -qq procps telnet apache2 php7.3 -qq >/d  0.0s
 => CACHED [3/8] RUN useradd --user-group --create-home --shell /bin/false app                                     0.0s
 => CACHED [4/8] WORKDIR /home/app                                                                                 0.0s
 => [5/8] COPY . /home/app                                                                                         0.1s
 => [6/8] RUN mkdir /data && chown -R app /data && chmod 777 /data                                                 0.5s
 => [7/8] COPY php.conf /etc/apache2/mods-available/php7.3.conf                                                    0.1s
 => ERROR [8/8] RUN a2enmod userdir && a2enmod php7.3                                                              0.7s
------
 > [8/8] RUN a2enmod userdir && a2enmod php7.3:
#12 0.623 Enabling module userdir.
#12 0.626 To activate the new configuration, you need to run:
#12 0.626   service apache2 restart
#12 0.652 ERROR: Module php7.3 does not exist!
------
executor failed running [/bin/sh -c a2enmod userdir && a2enmod php7.3]: exit code: 1

It seems that the step number 8 fails because of missing PHP, even if it seems to be installed at step 2.

Do I miss anything?

@curia-damiano
Copy link
Contributor Author

I have found the reason of the issue: the Dockerfile references the latest version of Debian, that includes now PHP 7.4.

The Dockerfile should have referenced Debian in this way:
FROM debian:10

@mschwartz
Copy link
Collaborator

mschwartz commented Sep 10, 2021 via email

mschwartz added a commit that referenced this issue Sep 10, 2021
Fixed issue #84 blocking the version of Debian
@curia-damiano
Copy link
Contributor Author

Done and seen the merge, super fast!

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

No branches or pull requests

2 participants