aws-samples / ecs-demo-php-simple-app

A simple PHP sample application http://aws.amazon.com/ecs
Apache License 2.0
168 stars 3.38k forks source link

Failures in Step 3 #5

Open ibz096 opened 7 years ago

ibz096 commented 7 years ago

Building the Dockerfile gives errors.

Host machine: cat /etc/*release CentOS Linux release 7.3.1611 (Core) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.3.1611 (Core) CentOS Linux release 7.3.1611 (Core)

Docker version Docker version 1.12.6, build 88a4867/1.12.6

I built the image with docker build username/projectname:latest . I noticed some errors, but just ignored them.

I ran the ran image in interactive mode and noticed that there was no apache2 binary. I tried looking for the apache2 binary with sudo find / -name apa*

I also looked through /etc/ , /bin/ , /sbin/ , for any kind of apache files, but no luck

I have attached the output of the docker build command here: docker-output.txt

Please useless -Rto read the docker-output.txtwith ANSI color formatting

zeninfinity commented 7 years ago

I had a similar issue:


...

groupadd: failure while writing changes to /etc/group
addgroup: `/usr/sbin/groupadd -g 102 ssh' returned error code 10. Exiting.
dpkg: error processing openssh-client (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up rsync (3.0.9-1ubuntu1.1) ...
 Removing any system startup links for /etc/init.d/rsync ...
invoke-rc.d: policy-rc.d denied execution of restart.
Setting up sgml-base (1.26+nmu1ubuntu1) ...
Setting up xauth (1:1.0.6-1) ...
Setting up xml-core (0.13) ...
Setting up libapr1 (1.4.6-1) ...
Setting up libaprutil1 (1.3.12+dfsg-3) ...
Setting up libaprutil1-dbd-sqlite3 (1.3.12+dfsg-3) ...
Setting up libaprutil1-ldap (1.3.12+dfsg-3) ...
Setting up apache2.2-bin (2.2.22-1ubuntu1.11) ...
Setting up apache2-utils (2.2.22-1ubuntu1.11) ...
Setting up libclass-isa-perl (0.36-3) ...
Setting up curl (7.22.0-3ubuntu4.17) ...
Setting up git-man (1:1.7.9.5-1ubuntu0.3) ...
Setting up php5-common (5.3.10-1ubuntu3.26) ...
Setting up libmcrypt4 (2.5.8-3.1) ...
Setting up patch (2.6.1-3ubuntu0.1) ...
Setting up php5-cli (5.3.10-1ubuntu3.26) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype

Creating config file /etc/php5/cli/php.ini with new version
update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode.
Setting up php5-mcrypt (5.3.5-0ubuntu1) ...
Setting up php5-mysql (5.3.10-1ubuntu3.26) ...
Setting up ssl-cert (1.0.28ubuntu0.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
groupadd: failure while writing changes to /etc/group
addgroup: `/usr/sbin/groupadd -g 102 ssl-cert' returned error code 10. Exiting.
dpkg: error processing ssl-cert (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up perl-modules (5.14.2-6ubuntu2.5) ...
Setting up libswitch-perl (2.16-2) ...
Setting up perl (5.14.2-6ubuntu2.5) ...
update-alternatives: using /usr/bin/prename to provide /usr/bin/rename (rename) in auto mode.
Setting up apache2.2-common (2.2.22-1ubuntu1.11) ...
Enabling site default.
Enabling module alias.
Enabling module autoindex.
Enabling module dir.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module status.
Enabling module auth_basic.
Enabling module deflate.
Enabling module authz_default.
Enabling module authz_user.
Enabling module authz_groupfile.
Enabling module authn_file.
Enabling module authz_host.
Enabling module reqtimeout.
Setting up apache2-mpm-prefork (2.2.22-1ubuntu1.11) ...
invoke-rc.d: policy-rc.d denied execution of start.
Setting up apache2 (2.2.22-1ubuntu1.11) ...
Setting up liberror-perl (0.17-1) ...
Setting up git (1:1.7.9.5-1ubuntu0.3) ...
Setting up libapache2-mod-php5 (5.3.10-1ubuntu3.26) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype

Creating config file /etc/php5/apache2/php.ini with new version
invoke-rc.d: policy-rc.d denied execution of restart.
Setting up php5 (5.3.10-1ubuntu3.26) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 openssh-client
 ssl-cert
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/sh -c apt-get install -y git curl apache2 php5 libapache2-mod-php5 php5-mcrypt php5-mysql' returned a non-zero code: 100
Build step 'Docker Build and Publish' marked build as failure
Finished: FAILURE```
sungine commented 7 years ago

I have the same issue as

zeninfinity