dperson / samba

Samba docker container
GNU Affero General Public License v3.0
1.5k stars 509 forks source link

Unbound Variable - MicroK8s - Raspberry PI #419

Closed Apollorion closed 1 year ago

Apollorion commented 1 year ago

Running this container on MicroK8s 1.23/stable, Raspberry PI 4, Ubuntu Server 20.04

Here is my manifest

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: share
  namespace: share
spec:
  selector:
    matchLabels:
      app: share
  replicas: 1
  template:
    metadata:
      labels:
        app: share
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                - key: kubernetes.io/hostname
                  operator: In
                  values:
                    - worker-node-1
      containers:
        - name: share
          image: dperson/samba:aarch64
          args:
            - -p
          env:
            - name: USER
              value: "apollorion;apollorion;1000;1000;1000"
            - name: SHARE
              value: "apollorion;/mnt;yes;no;no;apollorion"
          volumeMounts:
            - name: share
              mountPath: /mnt
      volumes:
        - name: share
          hostPath:
            path: /mnt/share
            type: Directory
---
apiVersion: v1
kind: Service
metadata:
  name: share
  namespace: share
spec:
  type: NodePort
  ports:
    - name: samba1
      port: 139
      targetPort: 139
    - name: samba2
      port: 445
      targetPort: 445
  selector:
    app: share

It seems like no matter what I do, Im consistently getting the following error:

/usr/bin/samba.sh: line 117: $2: unbound variable

I've tried everything under the sun. Including not passing any arguments into the container, passing instead as environment variables, passing directly as arguments, mounting smb.conf directly, many different tags. I dont know what Im doing wrong, any help is appreciated.

ifengcheng commented 1 year ago

我也跟你遇到了同样的问题,把值的引号删除就可以了 比如 -s apollorion;/mnt;yes;no;no;apollorion