+++ b/container/initrd-cifs/Dockerfile @@ -0,0 +1,24 @@ +# Origin: https://github.com/Stanback/alpine-samba +# Copyright (C) 2016-2020 Eric D. Stanback +# SPDX-License-Identifier: GPL-3.0
+FROM alpine:edge
+MAINTAINER Xiao Shenwei xiaoshenwei96@163.com
+RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweicloud.com%7Cg' /etc/apk/repositories
Unnecessary blank lines.
+RUN adduser -u 1090 -D lkp
Unnecessary blank lines.
+RUN apk add --update \
- samba-common-tools \
- samba-client \
- samba-server \
- bash && \
- rm -rf /var/cache/apk/*
+COPY ./smb.conf /etc/samba/
+EXPOSE 446/tcp
+ENTRYPOINT ["smbd", "--foreground", "--no-process-group", "--log-stdout"] +++ b/container/initrd-cifs/start @@ -0,0 +1,24 @@ +#!/bin/bash +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+. $CCI_SRC/container/defconfig.sh
+lsmod | grep -q "^cifs\s" || {
- sudo modprobe cifs
+}
+docker_rm initrd-cifs
+cmd=(
- docker run
- -dt
Sometimes someone use '-id' sometimes someone use '-td'.
I've never understood the difference between '-id' and '-td'.
Thanks, Chenglong
- -p 446:445
- -v /etc/localtime:/etc/localtime:ro
- -v /srv/initrd:/srv/initrd
- --name initrd-cifs
- --restart=always
- alpine/initrd-cifs
+)
+"${cmd[@]}"
2.23.0