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

Publish updated docker images on github #38

Open
darkpixel opened this issue Feb 15, 2021 · 4 comments
Open

Publish updated docker images on github #38

darkpixel opened this issue Feb 15, 2021 · 4 comments

Comments

@darkpixel
Copy link

I'd like to see updated docker images published on GitHub.

A sample github action:

name: Docker
on:
  push:
    branches:
      - master
    tags:
      - v*
env:
  IMAGE_NAME: cachet
jobs:
    push:
      runs-on: ubuntu-latest
      if: github.event_name == 'push'
      steps:
        - uses: actions/checkout@v2
        - name: Build image
          run: docker build . --file Dockerfile --tag $IMAGE_NAME

        - name: Log into GitHub Container Registry
          run: echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin

        - name: Push image to GitHub Container Registry
          run: |
            IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME

            # Change all uppercase to lowercase
            IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')

            # Strip git ref prefix from version
            VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')

            # Strip "v" prefix from tag name
            [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')

            # Use Docker `latest` tag convention
            [ "$VERSION" == "master" ] && VERSION=latest

            echo IMAGE_ID=$IMAGE_ID
            echo VERSION=$VERSION

            docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
            docker push $IMAGE_ID:$VERSION
@fauust
Copy link

fauust commented Feb 23, 2021

Hi!
I also would like this to happen, but wouldn't it be easier to fork or ask https://github.com/CachetHQ/Docker maintainers to build a container based on this fork?

@fauust
Copy link

fauust commented Feb 23, 2021

I have just tested and it seems to work with (using docker-compose up):

diff --git a/docker-compose.yml b/docker-compose.yml
index 7691d2b..8491f6d 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -13,7 +13,8 @@ services:
     build:
       context: .
       args:
-        - cachet_ver=2.4
+        - cachet_ver=v2.5.0
+        - archive_url=https://github.com/fiveai/Cachet/archive/v2.5.0.tar.gz
     ports:
       - 80:8000
     links:
@@ -26,7 +27,7 @@ services:
       - DB_USERNAME=postgres
       - DB_PASSWORD=postgres
       - DB_PREFIX=chq_
-      - APP_KEY=${APP_KEY:-null}
+      - APP_KEY=base64:wQeI5J7wPPhwgtRLCtQEd1Q6CRoBHdPbZhMjHDGROwI=
       - APP_LOG=errorlog
       - APP_ENV=${APP_ENV:-production}
       - APP_DEBUG=false

@darkpixel
Copy link
Author

@fauust I don't think it would be easier. The project appears to be dead/unmaintained. I'd fork it and create docker images on my own--but I don't have time to update and maintain the codebase. I'd rather see someone else do it or get the maintainers to come back. ;)

@fauust
Copy link

fauust commented Apr 23, 2021

Hi!
https://github.com/sedan07/CachetDocker @sedan07 is building a container that seems quite up to date, https://hub.docker.com/r/sedan07/cachet.

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

2 participants