From 022bba8a482e762bb12329d9387410b76617598f Mon Sep 17 00:00:00 2001 From: Glaucio Campos <69731354+glauciocampos@users.noreply.github.com> Date: Thu, 18 May 2023 19:57:30 -0300 Subject: [PATCH] Added smbclient module (#1) --- .github/workflows/command-rebase.yml | 51 ------------- .github/workflows/docker-build-push.yml | 84 ++++++++++++++++++++++ .github/workflows/images.yml | 65 ----------------- .github/workflows/tagging-and-release.yaml | 32 +++++++++ .github/workflows/update-sh.yml | 29 -------- 24/apache/Dockerfile | 4 ++ 25/apache/Dockerfile | 4 ++ 26/apache/Dockerfile | 4 ++ README.md | 8 +++ 9 files changed, 136 insertions(+), 145 deletions(-) delete mode 100644 .github/workflows/command-rebase.yml create mode 100644 .github/workflows/docker-build-push.yml delete mode 100644 .github/workflows/images.yml create mode 100644 .github/workflows/tagging-and-release.yaml delete mode 100644 .github/workflows/update-sh.yml diff --git a/.github/workflows/command-rebase.yml b/.github/workflows/command-rebase.yml deleted file mode 100644 index 78fcf5d1..00000000 --- a/.github/workflows/command-rebase.yml +++ /dev/null @@ -1,51 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization - -name: Rebase command - -on: - issue_comment: - types: created - -permissions: - contents: read - -jobs: - rebase: - runs-on: ubuntu-latest - permissions: - contents: none - - # On pull requests and if the comment starts with `/rebase` - if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase') - - steps: - - name: Add reaction on start - uses: peter-evans/create-or-update-comment@v2 - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reaction-type: "+1" - - - name: Checkout the latest code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - token: ${{ secrets.COMMAND_BOT_PAT }} - - - name: Automatic Rebase - uses: cirrus-actions/rebase@1.7 - env: - GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} - - - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@v2 - if: failure() - with: - token: ${{ secrets.COMMAND_BOT_PAT }} - repository: ${{ github.event.repository.full_name }} - comment-id: ${{ github.event.comment.id }} - reaction-type: "-1" diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml new file mode 100644 index 00000000..08326e0d --- /dev/null +++ b/.github/workflows/docker-build-push.yml @@ -0,0 +1,84 @@ +name: Docker Build and Push + +on: + pull_request: + branches: + - master + +jobs: + build_and_push_nc: + name: Build and Push + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - + name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Generate random tag ID + id: random_tag + run: echo "TAG_RANDOM=$RANDOM" >> $GITHUB_ENV + + - + name: Nextcloud 24 Apache + uses: docker/build-push-action@v4 + with: + context: ./24/apache + platforms: linux/amd64 + push: true + tags: glauciocampos/nextcloud:24-apache-amd64-${{ env.TAG_RANDOM }} + + - + name: Nextcloud 24 Apache (arm64) + uses: docker/build-push-action@v4 + with: + context: ./24/apache + push: true + tags: glauciocampos/nextcloud:24-apache-arm64-${{ env.TAG_RANDOM }} + platforms: linux/arm64 + + - + name: Nextcloud 25 Apache (amd64) + uses: docker/build-push-action@v4 + with: + context: ./25/apache + push: true + tags: glauciocampos/nextcloud:25-apache-amd64-${{ env.TAG_RANDOM }} + platforms: linux/amd64 + + - + name: Nextcloud 25 Apache (arm64) + uses: docker/build-push-action@v4 + with: + context: ./25/apache + push: true + tags: glauciocampos/nextcloud:25-apache-arm64-${{ env.TAG_RANDOM }} + platforms: linux/arm64 + + - + name: Nextcloud 26 Apache (amd64) + uses: docker/build-push-action@v4 + with: + context: ./26/apache + push: true + tags: glauciocampos/nextcloud:26-apache-amd64-${{ env.TAG_RANDOM }} + platforms: linux/amd64 + + - + name: Nextcloud 26 Apache (arm64) + uses: docker/build-push-action@v4 + with: + context: ./26/apache + push: true + tags: glauciocampos/nextcloud:26-apache-arm64-${{ env.TAG_RANDOM }} + platforms: linux/arm64 diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml deleted file mode 100644 index ae9762a6..00000000 --- a/.github/workflows/images.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Images - -on: - pull_request: - workflow_run: - workflows: ["update.sh"] - branches: [master] - types: - - completed - -defaults: - run: - shell: 'bash -Eeuo pipefail -x {0}' - -jobs: - - init: - name: Generate Jobs - runs-on: ubuntu-latest - outputs: - strategy: ${{ steps.generate-jobs.outputs.strategy }} - steps: - - uses: actions/checkout@v3 - - uses: docker-library/bashbrew@v0.1.5 - - id: generate-jobs - name: Generate Jobs - run: | - strategy="$(GITHUB_REPOSITORY=nextcloud "$BASHBREW_SCRIPTS/github-actions/generate.sh")" - strategy="$("$BASHBREW_SCRIPTS/github-actions/munge-i386.sh" -c <<<"$strategy")" - echo "strategy=$strategy" >> "$GITHUB_OUTPUT" - jq . <<<"$strategy" # sanity check / debugging aid - - test: - needs: init - strategy: ${{ fromJson(needs.init.outputs.strategy) }} - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - name: Prepare Environment - run: ${{ matrix.runs.prepare }} - - name: Run update.sh script - run: ./update.sh - - name: Pull Dependencies - run: ${{ matrix.runs.pull }} - - name: Build ${{ matrix.name }} - run: ${{ matrix.runs.build }} - - name: History ${{ matrix.name }} - run: ${{ matrix.runs.history }} - - name: Test ${{ matrix.name }} - run: ${{ matrix.runs.test }} - - name: '"docker images"' - run: ${{ matrix.runs.images }} - - summary: - runs-on: ubuntu-latest - needs: test - - if: always() - - name: images-test-summary - - steps: - - name: Summary status - run: if ${{ needs.test.result != 'success' && needs.test.result != 'skipped' }}; then exit 1; fi diff --git a/.github/workflows/tagging-and-release.yaml b/.github/workflows/tagging-and-release.yaml new file mode 100644 index 00000000..009c8d5a --- /dev/null +++ b/.github/workflows/tagging-and-release.yaml @@ -0,0 +1,32 @@ +name: Tagging and Release + +on: + workflow_run: + workflows: ["Docker Build and Push"] + types: + - completed + pull_request: + types: + - closed + branches: + - master + +jobs: + release: + name: Create Tag and Release + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Create GitHub release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + with: + draft: false + allowUpdates: true + prerelease: false + makeLatest: true + body: Added smbclient + generateReleaseNotes: true \ No newline at end of file diff --git a/.github/workflows/update-sh.yml b/.github/workflows/update-sh.yml deleted file mode 100644 index 4e03239a..00000000 --- a/.github/workflows/update-sh.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: update.sh - -on: - push: - branches: - - master - schedule: - - cron: '15 0 * * *' - workflow_dispatch: - -jobs: - run_update_sh: - name: Run update.sh script - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Run update.sh script - run: ./update.sh - - name: Commit files - run: | - git config --local user.email "workflow@github.com" - git config --local user.name "GitHub Workflow" - git add -A - git commit -m "Runs update.sh" || echo "Nothing to update" - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - force: true diff --git a/24/apache/Dockerfile b/24/apache/Dockerfile index 7603a3fd..7f52f209 100644 --- a/24/apache/Dockerfile +++ b/24/apache/Dockerfile @@ -7,6 +7,8 @@ RUN set -ex; \ apt-get update; \ apt-get install -y --no-install-recommends \ busybox-static \ + smbclient \ + libsmbclient-dev \ bzip2 \ libldap-common \ libmagickcore-6.q16-6-extra \ @@ -64,12 +66,14 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.22; \ pecl install imagick-3.7.0; \ + pecl install smbclient; \ pecl install memcached-3.2.0; \ pecl install redis-5.3.7; \ \ docker-php-ext-enable \ apcu \ imagick \ + smbclient \ memcached \ redis \ ; \ diff --git a/25/apache/Dockerfile b/25/apache/Dockerfile index 91521f17..c9d4558a 100644 --- a/25/apache/Dockerfile +++ b/25/apache/Dockerfile @@ -7,6 +7,8 @@ RUN set -ex; \ apt-get update; \ apt-get install -y --no-install-recommends \ busybox-static \ + smbclient \ + libsmbclient-dev \ bzip2 \ libldap-common \ libmagickcore-6.q16-6-extra \ @@ -64,11 +66,13 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.22; \ pecl install imagick-3.7.0; \ + pecl install smbclient; \ pecl install memcached-3.2.0; \ pecl install redis-5.3.7; \ \ docker-php-ext-enable \ apcu \ + smbclient \ imagick \ memcached \ redis \ diff --git a/26/apache/Dockerfile b/26/apache/Dockerfile index ee711ff0..4a274cc7 100644 --- a/26/apache/Dockerfile +++ b/26/apache/Dockerfile @@ -7,6 +7,8 @@ RUN set -ex; \ apt-get update; \ apt-get install -y --no-install-recommends \ busybox-static \ + smbclient \ + libsmbclient-dev \ bzip2 \ libldap-common \ libmagickcore-6.q16-6-extra \ @@ -65,12 +67,14 @@ RUN set -ex; \ # pecl will claim success even if one install fails, so we need to perform each install separately pecl install APCu-5.1.22; \ pecl install imagick-3.7.0; \ + pecl install smbclient; \ pecl install memcached-3.2.0; \ pecl install redis-5.3.7; \ \ docker-php-ext-enable \ apcu \ imagick \ + smbclient \ memcached \ redis \ ; \ diff --git a/README.md b/README.md index 20a9cecf..bb046547 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ +# Forked from the official nextcloud docker image +## [Dockerhub repository ](https://hub.docker.com/repository/docker/glauciocampos/nextcloud-full/tags?page=1&ordering=last_updated) + +## Changes: +### [- Added smbclient to nextcloud:24-apache](https://github.com/glauciocampos/nextcloud-full/blob/master/.examples/README.md) +### [- Added smbclient to nextcloud:25-apache](https://github.com/glauciocampos/nextcloud-full/blob/master/.examples/README.md) +### [- Added smbclient to nextcloud:26-apache](https://github.com/glauciocampos/nextcloud-full/blob/master/.examples/README.md) + # What is Nextcloud? [![GitHub CI build status badge](https://github.com/nextcloud/docker/workflows/Images/badge.svg)](https://github.com/nextcloud/docker/actions?query=workflow%3AImages)