Install composer dependencies while deploying

I’m using Elastic Beanstalk to deploy my application as a Single Docker Application.

My Dockerfile does composer install while deploying, but I get a Could not authenticate against github.com error.

  • How to mount file from host to docker container on ECS
  • websocket protocol not supported trough Apache2 reverse proxy
  • Will single docker container scale automatically on Amazon's EC2?
  • What is the entry point/command required to run an etcd container in ECS?
  • Exposing Elastic Beanstalk environment variables to Laravel's artisan using Docker
  • AWS: docker container cannot connect to external website on SSL
  • I use these lines in my Dockerfile to install my dependencies:

    WORKDIR /www
    RUN ["composer", "install", "-o"]
    

    How would I solve this issue?

  • Permission denied when mounting Docker volume in OSX
  • Docker container can only access internet with --net=host
  • Jenkins Github Plugin can't choose my credentials
  • On kubernetes helm how to replace a pod with new config values
  • In Docker, how do I share a volume from a container to a host?
  • Docker memory overhead
  • 2 Solutions collect form web for “Install composer dependencies while deploying”

    I think you need to configure composer inside your container with your key or something like that, remember that inside your container you’re basically on another os and you don’t have public keys etc.

    I’d try to install it from source rather than from git (as you don’t have keys).

    try this:
    RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ()

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.