D
D
Doclassif02021-10-31 20:19:48
PHP
Doclassif0, 2021-10-31 20:19:48

How to set composer proxy in docker container?

I am using php:7.4-fpm and composer:latest images, but I can't download packages with composer. For example, for apt, I configured proxy.conf and threw it into the image, but how to register a proxy in the composer?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maksim Fedorov, 2021-10-31
@Maksclub

Here is the correct image

FROM php:8-fpm
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer

Everything is going

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question