doctrine1 icon indicating copy to clipboard operation
doctrine1 copied to clipboard

Fix docker images build to handle old linux distribution

Open alquerci opened this issue 3 years ago • 12 comments

#see https://github.com/FriendsOfSymfony1/symfony1/pull/270

alquerci avatar Nov 29 '22 16:11 alquerci

@alquerci could you please rebase this as well? Thanks!

thirsch avatar Jan 13 '23 21:01 thirsch

@thirsch rebased too.

alquerci avatar Apr 26 '23 21:04 alquerci

@thePanz it's rebased on master branch and ready to merge.

Now the .docker directory is exactly the same as on https://github.com/FriendsOfSymfony1/symfony1/pull/270

alquerci avatar Nov 19 '23 12:11 alquerci

Rebased on master branch.

With fix download PHP extension from PECL without TLS

alquerci avatar Jan 20 '24 15:01 alquerci

@thirsch @Tybaze @thePanz Build docker images from scratch works : done it on GitHub action

The .docker directory is exactly the same on symfony1 repository on the similar PR. https://github.com/FriendsOfSymfony1/symfony1/pull/270

alquerci avatar Jan 20 '24 20:01 alquerci

As we only support v7.4 or >= 8.1, we should review the docker image handling and simplify it.

What about using the Linux Alpine images, and install.the extensions with APK? Another approach would be using mlocati ext installer (which triggers the compiling of the extensions, IIRC)

thePanz avatar Feb 11 '24 20:02 thePanz

@thePanz what issues do you see?

Your issues will be tackle with care.


My thinking

There are many ways to do one thing. First make it work, then make it well, then make it fast.

The purpose of this PR was to make the local development environment working. There still need to work with more than one PHP version.

The first patch was done since more than 1 year. I waste a lot of times maintaining it as a side branch. I am going to be psychological tied working on it.

Working on big things does not work, big PR need too much time to review, then are hard to be merged. However, small things, small PR can be merged more easily and frequently. I do not want to make any more changes on this one and others I have done.

alquerci avatar Feb 11 '24 21:02 alquerci

@thePanz what issues do you see?

Not sure, I did not mention any issue.. I might not get your question, sorry.

Yes, I noticed that this PR (and the other one for SF¹) is quite old and got a lot of work. This is remarkable the work you did here! This work, and the other PR, helped a lot other devs too to provide fixes and opening PRs in this organisation, and this is geat!

My comment was more towards a next step, where PHP 5.3 can be removed from the docker containers, hopefully reducing the complexity in handling the setup of such versions ofn Linux.

thePanz avatar Feb 11 '24 21:02 thePanz

@thePanz yes, we can simplify it, reduce build time and more.

Removing PHP 5.3 does not make a big difference, as I successfully make the alignment of PHP 5.3 docker image interface with overs. See the configuration merge done on docker-compose.

The major impact of removing PHP version for docker is to reduce the build time.

Where improvement exists, there is at least one issue. But if there is no issue, making improvement is useless.


The issue you are talking about is the complexity of the Dockerfile. I do not tackle this one yet, as I focus on make it work.

Other issues are:

  • Docker image build time
  • [sf1] Slow test suite, almost one hour to run all tests for all versions.

alquerci avatar Feb 11 '24 22:02 alquerci

[sf1] Slow test suite, almost one hour to run all tests for all versions.

How much faster would parallel testing be?

connorhu avatar Feb 11 '24 22:02 connorhu

[sf1] Slow test suite, almost one hour to run all tests for all versions.

How much faster would parallel testing be?

No faster than the slowest test.

Parallel testing, indeed, is an idea, but it is not supported now.

alquerci avatar Feb 11 '24 23:02 alquerci

I will give a try to paratest. I've never used it, I wonder how much faster it is.

connorhu avatar Feb 11 '24 23:02 connorhu