Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker-image for Deployer #3118

Closed
alexgit2k opened this issue Apr 29, 2022 · 40 comments
Closed

Docker-image for Deployer #3118

alexgit2k opened this issue Apr 29, 2022 · 40 comments

Comments

@alexgit2k
Copy link
Contributor

alexgit2k commented Apr 29, 2022

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

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@minkbear
Copy link

minkbear commented May 14, 2022

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

@alexgit2k
Copy link
Contributor Author

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.

@minkbear
Copy link

minkbear commented May 15, 2022

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.

@antonmedv
Copy link
Member

Use first url, but follow redirects. curl -L

@minkbear
Copy link

minkbear commented May 15, 2022

Use first url, but follow redirects. curl -L

Tested, Works fine. Thanks

@alexislefebvre
Copy link
Contributor

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

@minkbear
Copy link

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

What am I missing?

@alexislefebvre
Copy link
Contributor

alexislefebvre commented Jun 16, 2022

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

@alexgit2k
Copy link
Contributor Author

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.

@pknap
Copy link

pknap commented Aug 4, 2022

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?

@minkbear
Copy link

minkbear commented Aug 8, 2022

@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
Copy link

minkbear commented Aug 8, 2022

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

@qwerin
Copy link

qwerin commented Aug 16, 2022

@minkbear
Copy link

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

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

@dennismetz
Copy link

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

@alexgit2k
Copy link
Contributor Author

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

@minkbear
Copy link

minkbear commented Jan 24, 2023

Updated

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

@alexgit2k
Copy link
Contributor Author

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

@pknap
Copy link

pknap commented Jan 31, 2023

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

@minkbear
Copy link

minkbear commented Feb 1, 2023

@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

@antonmedv
Copy link
Member

Should we create automation to publish docker releases as well?

@alexgit2k
Copy link
Contributor Author

alexgit2k commented Feb 1, 2023

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.

@alexislefebvre
Copy link
Contributor

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
Copy link
Contributor

Please see #3487

@rvanlaak
Copy link

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?

@alexgit2k
Copy link
Contributor Author

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

@marvinhinz
Copy link
Contributor

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

@antonmedv
Copy link
Member

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

@rvanlaak
Copy link

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

@antonmedv
Copy link
Member

I guess php8 as base image.

@Schrank
Copy link
Contributor

Schrank commented Apr 8, 2024

I would assume if @antonmedv is fine with it, we should think about adding a github action to provide a docker image. github has it's own registry and technically we should be able to build an image with the new deployer version.

cc @rvanlaak

I'm neither into docker nor github actions, but if someone has any questions I'm happy to help

@Konafets
Copy link
Contributor

Konafets commented Apr 8, 2024

@Schrank There is already a GH action -> https://github.com/deployphp/action

@Schrank
Copy link
Contributor

Schrank commented Apr 8, 2024

@Konafets Thanks! Correct me, but this action runs deployer, doesn't it? I'm looking for a docker image which can be used in bitbucket, gitlab and other pipelines.

Or is it possible? That would be awesome <3

@Konafets
Copy link
Contributor

Konafets commented Apr 8, 2024

@Schrank Seems a coincidence. Just posted that comment with a workaround as long there is no official docker image:

#3738 (comment)

@uacode
Copy link

uacode commented Apr 8, 2024

@Schrank What about this variant?

bitbucket-pipelines.yml


pipelines:
  default:
    - parallel:
        - step:
            name: Deployment
            script:
              - apt-get update && apt-get install -y libssh2-1-dev git unzip
              - git clone https://github.com/php/pecl-networking-ssh2.git /usr/src/php/ext/ssh2 && docker-php-ext-install ssh2
              - docker-php-ext-install -j$(nproc) ssh2
              - curl -LO https://github.com/deployphp/deployer/releases/latest/download/deployer.phar
              - mv deployer.phar ./dep
              - chmod +x ./dep
              - ./dep --version
              - ./dep deploy test

@Schrank
Copy link
Contributor

Schrank commented Apr 8, 2024

@Konafets No coincidence 😂 Your post was my start to push this topic :)

@uacode That does exactly what we want in bitbucket and this is what we do, nonetheless it would save some time to have a docker image and not install everyhing every time. Thanks for providing it!

@alexgit2k
Copy link
Contributor Author

@Konafets Thanks! Correct me, but this action runs deployer, doesn't it? I'm looking for a docker image which can be used in bitbucket, gitlab and other pipelines.

Just updated the initial ticket, the latest deployer-version 7.3.3 is only available at https://hub.docker.com/r/pipelinecomponents/deployer

It has only an example for Gitlab, so I do not know if it is running with Bitbucket or other pipelines.

@uacode
Copy link

uacode commented Apr 8, 2024

@Schrank Tell me please, its possible to set deployment strategy in bitbucket-pipelines.yml not in deploy.php?

@uacode
Copy link

uacode commented Apr 12, 2024

~22 sec No Docker https://prnt.sc/n1Edf82Dxdy7
vs
~2 sec - Docker https://prnt.sc/7bxIfE2m8LcR

image: uacode/deployer

pipelines:
  default:
    - parallel:
        - step:
            name: Deployment
            script:
#              - php --version
              - dep deploy test

Copy link
Contributor

github-actions bot commented Sep 9, 2024

This issue has been automatically closed. Please, open a discussion for bug reports and feature requests.

Read more: [https://github.com//discussions/3888]

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2024
@deployphp deployphp locked and limited conversation to collaborators Sep 12, 2024
@antonmedv antonmedv converted this issue into discussion #3893 Sep 12, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests