Skip to content
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

Update docker #4362

Open
sayem314 opened this issue Oct 30, 2023 · 16 comments
Open

Update docker #4362

sayem314 opened this issue Oct 30, 2023 · 16 comments
Assignees

Comments

@sayem314
Copy link

v2.4.0 is missing in docker image

@jbrooksuk jbrooksuk self-assigned this Oct 30, 2023
@sayem314
Copy link
Author

Any update? @jbrooksuk

@danimo
Copy link

danimo commented Feb 16, 2024

Is there any way we can help this moving along? I am happy to contribute a github release workflow.

@jbrooksuk
Copy link
Member

Sorry folks! I've not actually done the Cachet Docker release before. @djdefi did all of that.

If we can get a GitHub workflow going, that'd be great.

@djdefi
Copy link
Contributor

djdefi commented Feb 26, 2024

Hey @jbrooksuk nice to hear from you!

I used to use this script https://github.com/cachethq/Docker/blob/main/release-helper.sh -- Most of this could be automated in GitHub Actions like https://github.com/docker/build-push-action today instead of doing it via that manual script.

On a new release of Cachet, it comes down to bumping the version here: https://github.com/cachethq/Docker/blob/e88a87d7a6cd29df8d6d1fb6f05de8678bab1782/Dockerfile#L9 and then creating the relevant GitHub tags/release and pushing the image to Dockerhub etc.

It looks like we have the updates to the Dockerfile and such already in place on main, but I think I lost access to the project before being able to create the relevant tag/release for 2.4.0

Building and running it manually from main should work in the interim.

@danimo
Copy link

danimo commented Feb 26, 2024

See cachethq/Docker#426 for an initial version. Adding support for Docker Hub should be as easy as

      - name: Login to Docker Hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }} 
          password: ${{ secrets.DOCKERHUB_TOKEN }}

And then publish the docker image like the PR does with GHCR. I skipped that mostly because I cannot publish to docker Hub (well, I could setup my own org there, but for now, GHCR was good enough).

Does that help?

@danimo
Copy link

danimo commented Feb 27, 2024

I've done some cleanups, actions are still on a deprecated nodejs version, but that seems to be something they need to fix on their own.

@jbrooksuk
Copy link
Member

@djdefi good to hear from you too. Thank you for clarifying the process. I'm not a big Docker guy, so I don't know much of it,

@danimo that's awesome! Thank you so much. I guess I need to replace the docker/login-action in the PR to the one you provided?

      - name: Login to Docker Hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }} 
          password: ${{ secrets.DOCKERHUB_TOKEN }}

@danimo
Copy link

danimo commented Feb 27, 2024

Please never reveal plaintext secrets in commits. https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions explains how Github Action Secrets work.

@danimo
Copy link

danimo commented Feb 27, 2024

One more hint: To try out Docker Actions without polluting the main project with error messages protentially confusing to others, it's best to fork the project into your personal space, try to make Secrets work there and then create a PR with the result.

Also know that the reason why GHCR.io just works is because its token is implied in GitHub Action's default environment (via secrets.GITHUB_TOKEN). So for external registries, you need to employ the help of GH secrets.

@jbrooksuk
Copy link
Member

@danimo I've already configured GitHub Actions Secrets for the repository now 👍🏻

@danimo
Copy link

danimo commented Feb 28, 2024

I took a look, REGISTRY: ghcr.io still looks wrong, assuming you only want to push to Docker Hub, see the metadata-action part. See https://github.com/docker/metadata-action for reference.

@bhavicp
Copy link

bhavicp commented Mar 14, 2024

Would love to see an official built one, the current DockerFile etc provided doesn't work for us anymore. I guess some of the dependeicies from php7 or other are no longer available

ERROR: failed to solve: process "/bin/sh -c apk add --no-cache --update mysql-client php7 php7-apcu php7-bcmath php7-ctype php7-curl php7-dom php7-fileinfo php7-fpm php7-gd php7-iconv php7-intl php7-json php7-mbstring php7-mcrypt php7-mysqlnd php7-opcache php7-openssl php7-pdo php7-pdo_mysql php7-pdo_pgsql php7-pdo_sqlite php7-phar php7-posix php7-redis php7-session php7-simplexml php7-soap php7-sqlite3 php7-tokenizer php7-xml php7-xmlwriter php7-zip php7-zlib postfix postgresql postgresql-client sqlite sudo wget sqlite git curl bash grep supervisor" did not complete successfully: exit code: 45`

@esseti
Copy link

esseti commented Apr 17, 2024

If not official, is there a reliable docker container built by someone else that could be used?

@jbrooksuk
Copy link
Member

I'd love some further help to get Docker automated and up to date. Can anyone help me out here, please? 😊

@danimo
Copy link

danimo commented Apr 30, 2024

I can, what is is that you need exactly? An adjusted workflow that works against the docker registry? The most important part (that only you can contribute) is adding the Docker Hub login credentials as described here and login. After that, simply adjust where the image is pushed to. Ping me if you are stuck.

@esseti
Copy link

esseti commented May 2, 2024

I'd love some further help to get Docker automated and up to date. Can anyone help me out here, please? 😊

What kind of help is needed here?
Recreate the Dockerfile?

i tried to build it locally but there are a couple of dependency that do not play well with the alpine version (packages have been remove/moved).

Is there a full list of the requirements and step-by-step instructions? what is in the doc for installation assumes a lot of things on the ability of the user to understand the command and have everything ready on the machine. At least to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants