Multiple docker containers elastic beanstalk

by cdmckay   Last Updated April 30, 2015 21:00 PM

I'm running my Play Scala app on Elastic Beanstalk using a single container Docker. The thing is, if I SSH into my instance, and run docker ps, I see this:

CONTAINER ID        IMAGE                              COMMAND                CREATED             STATUS              PORTS               NAMES
b97459277e72        aws_beanstalk/current-app:latest   "/bin/sh -c 'rm -f R   10 minutes ago      Up 10 minutes       9000/tcp            cranky_rosalind     
7ffa795d6810        3dfb5143a62a                       "/bin/sh -c 'rm -f R   13 minutes ago      Up 13 minutes       9000/tcp            serene_sinoussi     
bbf010d8f02d        3dfb5143a62a                       "/bin/sh -c 'rm -f R   14 minutes ago      Up 14 minutes       9000/tcp            fervent_hawking     
ec9c3d329d1d        3dfb5143a62a                       "/bin/sh -c 'rm -f R   15 minutes ago      Up 15 minutes       9000/tcp            insane_hypatia      
9ffa80f40fec        3dfb5143a62a                       "/bin/sh -c 'rm -f R   16 minutes ago      Up 16 minutes       9000/tcp            admiring_rosalind 

Should there be that many running containers?

Shouldn't there only be 1 container?

This is what my Dockerfile looks like:

FROM java:openjdk-8-jre
MAINTAINER XXXX
EXPOSE 9000
ADD files /
WORKDIR /opt/docker
RUN ["chown", "-R", "daemon", "."]
USER daemon
ENTRYPOINT rm -f RUNNING_PID && bin/my-app -mem 1360 -DapplyEvolutions.default=true
CMD []


Answers 1


I think the reason you're seeing so many is because they're failing to start up and get restarted. I have never seen anyone using ENTRYPOINT cmd1 && cmd2

Try moving your start-up sequence into a separate start.sh script and use that one as an ENTRYPOINT instead.

telamon
telamon
June 11, 2015 12:23 PM

Related Questions


How to make AWS containers communicate

Updated January 02, 2018 23:00 PM

Deploy a Docker environment on Elastic Beanstalk

Updated August 03, 2015 14:00 PM

AWS ElasticBeanstalk: container keeps restarting

Updated September 23, 2015 20:00 PM