From ff860243b863f0189a76439f3cf26d02cb2b1491 Mon Sep 17 00:00:00 2001 From: Christopher <1289128+dragonfire1119@users.noreply.github.com> Date: Sun, 6 Oct 2024 21:14:48 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Add=20nextcloud-with-smbcli?= =?UTF-8?q?ent=20image=20(#24)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ feat: Add nextcloud-with-smbclient image This commit adds a new Docker image for Nextcloud with the SMB client extension enabled. The image is based on the official Nextcloud image and installs the necessary dependencies to enable the SMB client functionality. The changes include: - Added a README.md file with instructions for building and running the Docker image. - Created a GitHub Actions workflow to automatically build and push the Docker image to DockerHub. - Added a Dockerfile to build the Docker image, which installs the SMB client extension and enables it in the PHP configuration. - Added a VERSION file with the current version of the image. The purpose of these changes is to provide a ready-to-use Nextcloud image that includes the SMB client functionality, making it easier for users to integrate Nextcloud with their SMB file shares. * ✨🐳 feat(nextcloud): Add smbclient support to Nextcloud Adds support for smbclient to the Nextcloud Docker image. This allows Nextcloud to access SMB/CIFS shares directly without the need for external plugins or third-party integrations. The changes include: - Update the base image to the latest 30.0-apache version - Install the necessary build dependencies for the smbclient PHP extension - Install and enable the smbclient PHP extension - Clean up the APT cache and temporary files to reduce the image size --- ..._release_for_nextcloud_with_smbclient.yaml | 47 +++++++++++++++++++ nextcloud-with-smbclient/Dockerfile | 10 ++++ nextcloud-with-smbclient/README.md | 9 ++++ nextcloud-with-smbclient/VERSION | 1 + 4 files changed, 67 insertions(+) create mode 100644 .github/workflows/build_and_release_for_nextcloud_with_smbclient.yaml create mode 100644 nextcloud-with-smbclient/Dockerfile create mode 100644 nextcloud-with-smbclient/README.md create mode 100644 nextcloud-with-smbclient/VERSION diff --git a/.github/workflows/build_and_release_for_nextcloud_with_smbclient.yaml b/.github/workflows/build_and_release_for_nextcloud_with_smbclient.yaml new file mode 100644 index 0000000..88c9f37 --- /dev/null +++ b/.github/workflows/build_and_release_for_nextcloud_with_smbclient.yaml @@ -0,0 +1,47 @@ +name: "Build and release for nextcloud-with-smbclient" + +on: + push: + branches: + - main + paths: + - "nextcloud-with-smbclient/**" + +jobs: + create: + name: "Creates the newest release by version" + runs-on: "ubuntu-latest" + + steps: + - name: Checkout project + uses: actions/checkout@v2.3.4 + + # New step to read the VERSION file and set the version as an output + - name: Get the version + id: get_version + run: echo "nextcloud_with_smbclient_version=$(cat nextcloud-with-smbclient/VERSION)" >> $GITHUB_ENV + + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all + + - name: Set up Docker Build + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + platforms: linux/amd64,linux/arm64 + context: ./nextcloud-with-smbclient + file: ./nextcloud-with-smbclient/Dockerfile + tags: | + bigbeartechworld/big-bear-nextcloud-with-smbclient:latest + bigbeartechworld/big-bear-nextcloud-with-smbclient:${{ env.nextcloud_with_smbclient_version }} diff --git a/nextcloud-with-smbclient/Dockerfile b/nextcloud-with-smbclient/Dockerfile new file mode 100644 index 0000000..1a7318e --- /dev/null +++ b/nextcloud-with-smbclient/Dockerfile @@ -0,0 +1,10 @@ +FROM nextcloud:30.0-apache + +RUN set -e; \ + apt-get update && \ + apt-get install -y libsmbclient-dev build-essential autoconf && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + pecl install smbclient && \ + docker-php-ext-enable smbclient && \ + php -m | grep -q 'smbclient' diff --git a/nextcloud-with-smbclient/README.md b/nextcloud-with-smbclient/README.md new file mode 100644 index 0000000..3446738 --- /dev/null +++ b/nextcloud-with-smbclient/README.md @@ -0,0 +1,9 @@ +# Instructions to build and run the Docker image + +Made for: https://community.bigbeartechworld.com/t/script-request-smb-share-into-nextcloud/1484?u=dragonfire1119 + +# Build docker image with: + +``` +docker build . -t big-bear-nextcloud-with-smbclient +``` diff --git a/nextcloud-with-smbclient/VERSION b/nextcloud-with-smbclient/VERSION new file mode 100644 index 0000000..8acdd82 --- /dev/null +++ b/nextcloud-with-smbclient/VERSION @@ -0,0 +1 @@ +0.0.1