diff --git a/apps/samba/4.18.9/.env.sample b/apps/samba/4.18.9/.env.sample new file mode 100644 index 00000000..5a9c4bc8 --- /dev/null +++ b/apps/samba/4.18.9/.env.sample @@ -0,0 +1,13 @@ +CONTAINER_NAME="samba" +DATA_PATH="./data" +HOSTNAME="samba" +INTERNAL_DATA_PATH="/share/data" +PANEL_APP_PORT_HTTP="139" +PANEL_APP_PORT_SMB="445" +SHARE_1="SmbShare:/share/folder:rw:pirate" +SHARE_2="" +SHARE_3="" +TZ="Asia/Shanghai" +USER_1="1000:1000:pirate:pirate:put-any-password-here" +USER_2="" +USER_3="" diff --git a/apps/samba/4.18.9/data.yml b/apps/samba/4.18.9/data.yml new file mode 100644 index 00000000..b7485550 --- /dev/null +++ b/apps/samba/4.18.9/data.yml @@ -0,0 +1,89 @@ +additionalProperties: + formFields: + - default: 139 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: 445 + edit: true + envKey: PANEL_APP_PORT_SMB + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "samba" + edit: true + envKey: HOSTNAME + labelEn: Hostname + labelZh: 主机名 + required: true + type: text + - default: "Asia/Shanghai" + edit: true + envKey: TZ + labelEn: Time Zone + labelZh: 时区 + required: true + type: text + - default: "./data" + edit: true + envKey: DATA_PATH + labelEn: External Data Path + labelZh: 外部数据路径 + required: true + type: text + - default: "/share/data" + edit: true + envKey: INTERNAL_DATA_PATH + labelEn: Internal container data paths + labelZh: 容器内部数据路径 + required: true + type: text + - default: "1000:1000:pirate:pirate:put-any-password-here" + edit: true + envKey: USER_1 + labelEn: User 1 + labelZh: 用户 1 + required: true + type: text + - default: "SmbShare:/share/folder:rw:pirate" + edit: true + envKey: SHARE_1 + labelEn: Share 1 + labelZh: 共享 1 + required: true + type: text + - default: "" + edit: true + envKey: USER_2 + labelEn: User 2 (Edit to remove comments in compose.yml to take effect) + labelZh: 用户 2 (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: SHARE_2 + labelEn: Share 2 (Edit to remove comments in compose.yml to take effect) + labelZh: 共享 2 (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: USER_3 + labelEn: User 3 (Edit to remove comments in compose.yml to take effect) + labelZh: 用户 3 (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: SHARE_3 + labelEn: Share 3 (Edit to remove comments in compose.yml to take effect) + labelZh: 共享 3 (编辑去除compose.yml里的注释生效) + required: false + type: text + diff --git a/apps/samba/4.18.9/data/.gitkeep b/apps/samba/4.18.9/data/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/samba/4.18.9/docker-compose.yml b/apps/samba/4.18.9/docker-compose.yml new file mode 100644 index 00000000..cd300e82 --- /dev/null +++ b/apps/samba/4.18.9/docker-compose.yml @@ -0,0 +1,29 @@ +services: + samba: + image: "elswork/samba:4.18.9" + container_name: ${CONTAINER_NAME} + hostname: ${HOSTNAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:139" + - "${PANEL_APP_PORT_SMB}:445" + environment: + - TZ=${TZ} + volumes: + - "${DATA_PATH}:${INTERNAL_DATA_PATH}" + command: + -u "${USER_1}" + -s "${SHARE_1}" + #-u "${USER_2}" + #-s "${SHARE_2}" + #-u "${USER_3}" + #-s "${SHARE_3}" + + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/samba/4.18.9/scripts/init.sh b/apps/samba/4.18.9/scripts/init.sh new file mode 100644 index 00000000..4e811c86 --- /dev/null +++ b/apps/samba/4.18.9/scripts/init.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +chown -R 1000:1000 data \ No newline at end of file diff --git a/apps/samba/README.md b/apps/samba/README.md new file mode 100644 index 00000000..33f722a3 --- /dev/null +++ b/apps/samba/README.md @@ -0,0 +1,34 @@ +# Samba + +A [Docker](http://docker.com) file to build images for many platforms (linux/amd64, linux/arm64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6) with a installation of [Samba](https://www.samba.org/) that is the standard Windows interoperability suite of programs for Linux and Unix. This is my own Multi-architecture docker recipe. + +## 使用说明 + +Container will be configured as samba sharing server and it just needs: +容器将被配置为 samba 共享服务器,它只需要: + +- host directories to be mounted, + 要挂载的主机目录, +- users (one or more uid:gid:username:usergroup:password tuples) provided, + 提供的用户(一个或多个 uid:gid:用户名:用户组:密码元组), +- shares defined (name, path, users). + 定义的共享(名称、路径、用户)。 + +\-u uid:gid:username:usergroup:password +\-u uid:gid:用户名:用户组:密码 + +- uid from user p.e. 1000 + 用户 p.e. 的 uid 1000 +- gid from group that user belong p.e. 1000 + 来自用户所属组的 gid p.e. 1000 +- username p.e. alice 用户名爱丽丝 +- usergroup (the one to whom user belongs) p.e. alice + 用户组(用户所属的组)p.e.爱丽丝 +- password (The password may be different from the user's actual password from your host filesystem) + 密码(该密码可能与主机文件系统中用户的实际密码不同) + +\-s name:path:rw:user1\[,user2\[,userN\]\] +\-s 名称:路径:rw:用户1\[,用户2\[,用户N\]\] + +- add share, that is visible as 'name', exposing contents of 'path' directory for read+write (rw) or read-only (ro) access for specified logins user1, user2, .., userN + 添加共享,即显示为“名称”,公开“路径”目录的内容,以供指定登录 user1、user2、..、userN 进行读+写 (rw) 或只读 (ro) 访问 diff --git a/apps/samba/data.yml b/apps/samba/data.yml new file mode 100644 index 00000000..6c8bd03b --- /dev/null +++ b/apps/samba/data.yml @@ -0,0 +1,19 @@ +name: Samba +tags: + - 云存储 +title: 多架构 Samba 镜像构建 +description: 多架构 Samba 镜像构建 +additionalProperties: + key: samba + name: Samba + tags: + - Storage + shortDescZh: 多架构 Samba 镜像构建 + shortDescEn: Multi-architecture Samba image build + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://deft.work/samba + github: https://github.com/DeftWork/samba + document: https://github.com/DeftWork/samba diff --git a/apps/samba/latest/.env.sample b/apps/samba/latest/.env.sample new file mode 100644 index 00000000..5a9c4bc8 --- /dev/null +++ b/apps/samba/latest/.env.sample @@ -0,0 +1,13 @@ +CONTAINER_NAME="samba" +DATA_PATH="./data" +HOSTNAME="samba" +INTERNAL_DATA_PATH="/share/data" +PANEL_APP_PORT_HTTP="139" +PANEL_APP_PORT_SMB="445" +SHARE_1="SmbShare:/share/folder:rw:pirate" +SHARE_2="" +SHARE_3="" +TZ="Asia/Shanghai" +USER_1="1000:1000:pirate:pirate:put-any-password-here" +USER_2="" +USER_3="" diff --git a/apps/samba/latest/data.yml b/apps/samba/latest/data.yml new file mode 100644 index 00000000..b7485550 --- /dev/null +++ b/apps/samba/latest/data.yml @@ -0,0 +1,89 @@ +additionalProperties: + formFields: + - default: 139 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: 445 + edit: true + envKey: PANEL_APP_PORT_SMB + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "samba" + edit: true + envKey: HOSTNAME + labelEn: Hostname + labelZh: 主机名 + required: true + type: text + - default: "Asia/Shanghai" + edit: true + envKey: TZ + labelEn: Time Zone + labelZh: 时区 + required: true + type: text + - default: "./data" + edit: true + envKey: DATA_PATH + labelEn: External Data Path + labelZh: 外部数据路径 + required: true + type: text + - default: "/share/data" + edit: true + envKey: INTERNAL_DATA_PATH + labelEn: Internal container data paths + labelZh: 容器内部数据路径 + required: true + type: text + - default: "1000:1000:pirate:pirate:put-any-password-here" + edit: true + envKey: USER_1 + labelEn: User 1 + labelZh: 用户 1 + required: true + type: text + - default: "SmbShare:/share/folder:rw:pirate" + edit: true + envKey: SHARE_1 + labelEn: Share 1 + labelZh: 共享 1 + required: true + type: text + - default: "" + edit: true + envKey: USER_2 + labelEn: User 2 (Edit to remove comments in compose.yml to take effect) + labelZh: 用户 2 (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: SHARE_2 + labelEn: Share 2 (Edit to remove comments in compose.yml to take effect) + labelZh: 共享 2 (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: USER_3 + labelEn: User 3 (Edit to remove comments in compose.yml to take effect) + labelZh: 用户 3 (编辑去除compose.yml里的注释生效) + required: false + type: text + - default: "" + edit: true + envKey: SHARE_3 + labelEn: Share 3 (Edit to remove comments in compose.yml to take effect) + labelZh: 共享 3 (编辑去除compose.yml里的注释生效) + required: false + type: text + diff --git a/apps/samba/latest/data/.gitkeep b/apps/samba/latest/data/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/samba/latest/docker-compose.yml b/apps/samba/latest/docker-compose.yml new file mode 100644 index 00000000..ed5272d0 --- /dev/null +++ b/apps/samba/latest/docker-compose.yml @@ -0,0 +1,29 @@ +services: + samba: + image: "elswork/samba:latest" + container_name: ${CONTAINER_NAME} + hostname: ${HOSTNAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:139" + - "${PANEL_APP_PORT_SMB}:445" + environment: + - TZ=${TZ} + volumes: + - "${DATA_PATH}:${INTERNAL_DATA_PATH}" + command: + -u "${USER_1}" + -s "${SHARE_1}" + #-u "${USER_2}" + #-s "${SHARE_2}" + #-u "${USER_3}" + #-s "${SHARE_3}" + + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/samba/latest/scripts/init.sh b/apps/samba/latest/scripts/init.sh new file mode 100644 index 00000000..4e811c86 --- /dev/null +++ b/apps/samba/latest/scripts/init.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +chown -R 1000:1000 data \ No newline at end of file diff --git a/apps/samba/logo.png b/apps/samba/logo.png new file mode 100644 index 00000000..9cec3e62 Binary files /dev/null and b/apps/samba/logo.png differ