Skip to content

Commit

Permalink
✨ feat: Add nextcloud-with-smbclient image (#24)
Browse files Browse the repository at this point in the history
* ✨ 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
  • Loading branch information
dragonfire1119 authored Oct 7, 2024
1 parent 41825ca commit ff86024
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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/[email protected]

# 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 }}
10 changes: 10 additions & 0 deletions nextcloud-with-smbclient/Dockerfile
Original file line number Diff line number Diff line change
@@ -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'
9 changes: 9 additions & 0 deletions nextcloud-with-smbclient/README.md
Original file line number Diff line number Diff line change
@@ -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
```
1 change: 1 addition & 0 deletions nextcloud-with-smbclient/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1

0 comments on commit ff86024

Please sign in to comment.