deployer icon indicating copy to clipboard operation
deployer copied to clipboard

Docker-image for Deployer

Open alexgit2k opened this issue 3 years ago • 39 comments

An official maintained Docker-image for Deployer would be helpful.

I found the following third party-images: pipelinecomponents/deployer: version 7.3 (but seems only for Gitlab) minkbear/php-deployer: version 7.1

Outdated: ttskch/deployer: version 7.0 mwienk/php-deployer: version 6.8.0 kblais/deployer: version 6.3.0 herloct/deployer: version 5.0

alexgit2k avatar Apr 29 '22 14:04 alexgit2k

Here is my own build and used in gitlab CI. And just added 7.0.0-rc.8 https://hub.docker.com/r/minkbear/php-deployer/tags

minkbear avatar May 14 '22 09:05 minkbear

Here is my own build and used in gitlab CI. And just added 7.0.0-rc.8 https://hub.docker.com/r/minkbear/php-deployer/tags

Great, I will add it to the list above.

Your tag 7.0.0-rc.8 uses PHP 7.4, it should use PHP 8.1, same for your tag latest. Also a tag "7" for the latest Deployer-version 7 would be nice.

alexgit2k avatar May 14 '22 10:05 alexgit2k

Here is my own build and used in gitlab CI. And just added 7.0.0-rc.8 https://hub.docker.com/r/minkbear/php-deployer/tags

Great, I will add it to the list above.

Your tag 7.0.0-rc.8 uses PHP 7.4, it should use PHP 8.1, same for your tag latest. Also a tag "7" for the latest Deployer-version 7 would be nice.

Thanks for your recommendation so I reviewed and build the new one as described below

Tag Deployer Version PHP Version
latest 6.8.0 8.1
6 6.8.0 8.1
7 7.0.0-rc.8 8.1

One problem is PHAR file is different url to download for example

URL of 7.0.0-beta.34 and below version is https://deployer.org/releases/v7.0.0-beta.34/deployer.phar but others are https://github.com/deployphp/deployer/releases/download/v7.0.0-beta.35/deployer.phar

@antonmedv is that possible to be the same URL.

minkbear avatar May 15 '22 05:05 minkbear

Use first url, but follow redirects. curl -L

antonmedv avatar May 15 '22 07:05 antonmedv

Use first url, but follow redirects. curl -L

Tested, Works fine. Thanks

minkbear avatar May 15 '22 08:05 minkbear

The doc uses the deployphp/deployer:7 image: https://deployer.org/docs/7.x/ci-cd#gitlab-cicd It looks official.

alexislefebvre avatar Jun 15 '22 17:06 alexislefebvre

@alexislefebvre There is no image on docker hub (https://hub.docker.com/search?q=deployphp%2Fdeployer).

What am I missing?

minkbear avatar Jun 16 '22 04:06 minkbear

@minkbear You're right, it doesn't work, it can't pull this image:

docker pull deployphp/deployer:7
Error response from daemon: pull access denied for deployphp/deployer, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Anyway, I suggest to use the Docker registry of GitHub which is easier to use than Docker Hub.

Here is an example: https://github.com/alexislefebvre/docker-images/blob/main/.github/workflows/push.yaml

GitHub build and publish the images through Actions, they are available through ghcr.io/alexislefebvre/php-7.4-alpine-composer-gd. It should be possible to add something like this to this repository in order to create Docker images on every release automatically.

alexislefebvre avatar Jun 16 '22 09:06 alexislefebvre

The docs are wrong, there is no deployer-image. See https://hub.docker.com/r/deployphp Otherwise the maintainer would not have added the feature-flag here.

@alexislefebvre That's a nice solution for the deployer-maintainer or the maintainer of the other deployer-images.

alexgit2k avatar Jun 16 '22 12:06 alexgit2k

Hi @minkbear,

since deployer 7.0.0 now has been released, would it be possible that you updated your image to use 7.0.0 instead of 7.0.0-rc.8 on your docker image?

pknap avatar Aug 04 '22 21:08 pknap

@pknap updated as your requested tag 7 is now 7.0.0 already.

Tag Deployer Version PHP Version
latest 6.8.0 8.1
6 6.8.0 8.1
7 7.0.2 8.1
7.1 7.1.3 8.2

Thanks.

minkbear avatar Aug 08 '22 02:08 minkbear

@antonmedv got the problem that https://deployer.org/releases/v7.0.0/deployer.phar is not exists.

minkbear avatar Aug 08 '22 02:08 minkbear

@antonmedv got the problem that https://deployer.org/releases/v7.0.0/deployer.phar is not exists.

https://github.com/deployphp/deployer/releases/download/v7.0.0/deployer.phar

qwerin avatar Aug 16 '22 06:08 qwerin

https://deployer.org/releases/v7.0.0-beta.34/deployer.phar

Actually @antonmedv mention above (https://github.com/deployphp/deployer/issues/3118#issuecomment-1126878980) that use "https://deployer.org/releases/v7.0.0-beta.34/deployer.phar" URL then it will redirect to correct phar.

minkbear avatar Aug 16 '22 07:08 minkbear

@minkbear I would like to use the image with gitlab, unfortunately I don't quite understand. Could you create a short tutorial here - that would be great.

dennismetz avatar Sep 23 '22 10:09 dennismetz

I would like to use the image with gitlab, unfortunately I don't quite understand. Could you create a short tutorial here - that would be great.

@dennismetz There is already a documentation for Gitlab: https://deployer.org/docs/7.x/ci-cd#gitlab-cicd Haven't tried it, but it should work by just replacing name: deployphp/deployer:7 with name: minkbear/php-deployer:7

alexgit2k avatar Sep 23 '22 12:09 alexgit2k

Updated

Tag Deployer Version PHP Version
latest 6.8.0 8.1
6 6.8.0 8.1
7 7.1.3 8.2

minkbear avatar Jan 24 '23 15:01 minkbear

@minkbear Thanks, I updated the initial posting with the latest version. As Deployer version 7 is out of beta, tag latest should point to 7.1.3. Tag 7 should point to the latest 7-version 7.1.3. So if you want to keep 7.0.2 it should be tag 7.0.

alexgit2k avatar Jan 26 '23 13:01 alexgit2k

Hi @minkbear,

sorry to bother you again, but would it be possible to keep 7.0 version under separate tag, or have another one with 7.1 but keep the PHP on 8.1? Currently there is no combination with dep 7.x and php 8.1, so when the app does not yet support php 8.2, the image kind of gets backward incompatible.

Thank you

pknap avatar Jan 31 '23 11:01 pknap

@alexgit2k @pknap Updated. I will change latest later.

Tag Deployer Version PHP Version
latest 6.8.0 8.1
6 6.8.0 8.1
7 7.1.3 8.2
7.0 7.0.2 8.1

minkbear avatar Feb 01 '23 06:02 minkbear

Should we create automation to publish docker releases as well?

antonmedv avatar Feb 01 '23 11:02 antonmedv

Should we create automation to publish docker releases as well?

That would save a lot of work, if docker images get created for new deployer-releases automatically. But first at least one official deployer-docker-image would be great.

alexgit2k avatar Feb 01 '23 13:02 alexgit2k

It's possible to push images to the GitHub registry when a tag is released: https://github.com/binxio/push-to-registry-gh-action-workflow/blob/main/.github/workflows/push-to-registry.yaml (I didn't test it but it looks good)

alexislefebvre avatar Feb 02 '23 11:02 alexislefebvre

Please see #3487

alexislefebvre avatar Feb 14 '23 23:02 alexislefebvre

I can't seem to find the repo related to Dockerfile and builds for the images. @minkbear would you be willing to share these with us?

rvanlaak avatar Mar 28 '23 13:03 rvanlaak

I can't seem to find the repo related to Dockerfile and builds for the images. @minkbear would you be willing to share these with us?

https://github.com/minkbear/php-deployer

alexgit2k avatar Mar 28 '23 17:03 alexgit2k

just ran into this, why is the deployphp/deployer image given as an example in the docs, when there is no such published package?

marvinhinz avatar Apr 26 '23 18:04 marvinhinz

@marvinhinz I have plans to add it, but still didn’t found time for it.

antonmedv avatar Apr 26 '23 18:04 antonmedv

@antonmedv would there be anything we can help with? Already considered a base image?

rvanlaak avatar May 26 '23 10:05 rvanlaak

I guess php8 as base image.

antonmedv avatar May 26 '23 10:05 antonmedv