3

I launched two environments with 2 Dockerfile (One with Ubuntu, and one with Debian) on Amazon Web Service (BeanStalk)

DOCKERFILE UBUNTU :

FROM ubuntu:12.04

RUN apt-get update
RUN apt-get install -y emacs apt-utils
RUN apt-get install -y php5 php5-cli ldap-utils apache2 libapache2-mod-php5 php5-mysql
                       php-pear php5-dev php5-gd php5-mcrypt
RUN apt-get install -y libapache2-mod-auth-mysql
RUN apt-get install -y curl libcurl3 libcurl3-dev php5-curl
RUN apt-get install -y zziplib-bin
RUN apt-get install -y openssl

RUN a2enmod php5
RUN a2enmod rewrite

ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid

EXPOSE 80

CMD /usr/sbin/apache2ctl -D FOREGROUND

DOCKERFILE DEBIAN :

FROM debian

RUN apt-get update
RUN apt-get install -y emacs apt-utils
RUN apt-get install -y php5 php5-cli ldap-utils apache2 libapache2-mod-php5 php5-mysql
                       php-pear php5-dev php5-gd php5-mcrypt
RUN apt-get install -y libapache2-mod-auth-mysql
RUN apt-get install -y curl libcurl3 libcurl3-dev php5-curl
RUN apt-get install -y zziplib-bin
RUN apt-get install -y openssl

RUN a2enmod php5
RUN a2enmod rewrite

ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid

EXPOSE 80

CMD /usr/sbin/apache2ctl -D FOREGROUND

I don't understand why the debian version doesn't work...

I have only this error :

Create environment operation is complete, but with command timeouts. Try increasing the timeout period. For more information, see troubleshooting documentation.

Can you help me ? Any ideas ?

Rohit Banga
  • 18,458
  • 31
  • 113
  • 191
Guillaume
  • 586
  • 3
  • 21

1 Answers1

0

It is because time taken to download and build the docker image can be variable. You can increase the timeout using option settings.

Copying from my previous answer here: https://stackoverflow.com/a/25558805/161628

Option settings can be specified using ebextensions.

Create a file in your app source in a directory called .ebextensions. Lets say the file is .ebextensions/01-increase-timeout.config.

The contents of the file should be:

option_settings:
    - namespace: aws:elasticbeanstalk:command
      option_name: Timeout
      value: 1000

Note this file is in YAML format. After this you can update your environment with this version of source code.

From documentation for this option setting:

Timeout: Number of seconds to wait for an instance to complete executing commands.

For example, if source code deployment tasks are still running when you reach the configured timeout period, AWS Elastic Beanstalk displays the following error: "Some instances have not responded to commands. Responses were not received from <instance id>." You can increase the amount of time that the AWS Elastic Beanstalk service waits for your source code to successfully deploy to the instance.

You can read more about ebextensions here. Documentation on option settings is available here.

Community
  • 1
  • 1
Rohit Banga
  • 18,458
  • 31
  • 113
  • 191