box icon indicating copy to clipboard operation
box copied to clipboard

provide official docker images for box

Open BigBadBassMan opened this issue 3 years ago • 3 comments

Feature Request

Since more and more projects adopt docker (for CI/CD or simply for build purposes), an official box docker-image (or collection of images for different supported PHP versions), available from hub.docker.com, would be beneficial.

These could be built and pushed by Github actions on each release.

BigBadBassMan avatar Jul 27 '22 08:07 BigBadBassMan

I'm happy to merge it if there is an easy way to update the image on the docker hub on release 👍

theofidry avatar Aug 03 '22 20:08 theofidry

I'm happy to merge it if there is an easy way to update the image on the docker hub on release +1

I'm trying to figure this out, the idea was that a release package triggers a docker action which builds and publishes the image.

May take awhile since I have not used Github Actions before.

BigBadBassMan avatar Aug 15 '22 08:08 BigBadBassMan

So, this was not as complicated as I thought, the downside is: an account at hub.docker.com is needed to push, and its credentials (username & token) must be stored as secrets here.

The new workflow will download the latest release artifact after it has been published and bundle it as a docker image.

Open problems/questions remain:

  • It will run even on branches/pr's but still use only official packages, though.
  • docker "latest" is automatically assigned to each new built image - this may lead to problems, when releasing both 4.x and 3.x versions...

BigBadBassMan avatar Aug 17 '22 13:08 BigBadBassMan

It will run even on branches/pr's but still use only official packages, though.

Can't it depend on the Build.publish-phar job to alleviate that issue?

docker "latest" is automatically assigned to each new built image - this may lead to problems, when releasing both 4.x and 3.x versions...

Maybe this could be solved by using a different image name? E.g. box3 & box4.

theofidry avatar Sep 25 '22 15:09 theofidry