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 error.

  • Using a docker container querying an AWS RDS Instance
  • Warning: Module 'curl' already loading in Unknown on line 0 (Fix this from a custom.php.ini file)
  • How to logging in Amazon Web Service ( AWS )?
  • Running Spring Boot Microservices using Docker and AWS ECS
  • How to cache package manager downloads for docker builds?
  • Docker on RHEL 7 in AWS can’t pull images
  • I use these lines in my Dockerfile to install my dependencies:

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

    How would I solve this issue?

  • Boot2Docker Start up fails
  • File ownership on building docker images
  • Jenkins Pipeline as Code with Docker Error
  • what is the recommended way of passing environment variables to a docker service
  • How to set up etheruem nodes using docker?
  • Installing rbenv on docker ubuntu/debian
  • 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 | 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.