Browse Source

docker script update to support zh_CN.UTF-8

master
filesite 2 years ago
parent
commit
0a69b0714a
  1. 9
      Dockerfile_samba
  2. 9
      bin/install.sh
  3. 10
      conf/smb.conf

9
Dockerfile_samba

@ -38,10 +38,15 @@ RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n
&& chgrp apache /var/www/sambashare/ \ && chgrp apache /var/www/sambashare/ \
&& useradd -M -d /var/www/sambashare/filesite -s /usr/sbin/nologin -G apache filesite \ && useradd -M -d /var/www/sambashare/filesite -s /usr/sbin/nologin -G apache filesite \
&& chown -R filesite:apache /var/www/sambashare/filesite \ && chown -R filesite:apache /var/www/sambashare/filesite \
&& chmod -R 770 /var/www/sambashare/filesite \ && chmod -R 775 /var/www/sambashare/filesite \
&& rm -f /etc/samba/smb.conf && cp /var/www/machete/conf/smb.conf /etc/samba/ \ && rm -f /etc/samba/smb.conf && cp /var/www/machete/conf/smb.conf /etc/samba/ \
&& /var/www/machete/bin/smbpwd.sh filesite 88888888 \ && /var/www/machete/bin/smbpwd.sh filesite 88888888 \
&& ln -s /var/www/machete/bin/smbpwd.sh /usr/bin/smbpwd && ln -s /var/www/machete/bin/smbpwd.sh /usr/bin/smbpwd \
&& yum -y install kde-l10n-Chinese \
&& yum -y reinstall glibc-common \
&& localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 \
&& echo 'LANG="zh_CN.UTF-8"' >> /etc/locale.conf \
&& echo 'export LC_ALL="zh_CN.UTF-8"' >> ~/.bashrc
EXPOSE 80/tcp EXPOSE 80/tcp
EXPOSE 445/tcp EXPOSE 445/tcp

9
bin/install.sh

@ -22,6 +22,13 @@ rpm -ql php82-php-fpm-8.2.0~rc5-18.el7.remi
cd /etc/opt/remi/php82/ cd /etc/opt/remi/php82/
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/g' php.ini sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/g' php.ini
## zh_CN support
yum -y install kde-l10n-Chinese
yum -y reinstall glibc-common
localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
echo 'LANG="zh_CN.UTF-8"' >> /etc/locale.conf
echo 'export LC_ALL="zh_CN.UTF-8"' >> ~/.bashrc
## start php-fpm in background ## start php-fpm in background
#php-fpm -D #php-fpm -D
@ -48,7 +55,7 @@ sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/g' php.ini
#chgrp apache /var/www/sambashare/ #chgrp apache /var/www/sambashare/
#useradd -M -d /var/www/sambashare/filesite -s /usr/sbin/nologin -G apache filesite #useradd -M -d /var/www/sambashare/filesite -s /usr/sbin/nologin -G apache filesite
#chown -R filesite:apache /var/www/sambashare/filesite #chown -R filesite:apache /var/www/sambashare/filesite
#chmod -R 770 /var/www/sambashare/filesite #chmod -R 775 /var/www/sambashare/filesite
#smbpasswd -a filesite #smbpasswd -a filesite
#smbpasswd -e filesite #smbpasswd -e filesite

10
conf/smb.conf

@ -1,7 +1,13 @@
[global]
dos charset = cp866
unix charset = UTF8
display charset = UTF8
[machete] [machete]
path = /var/www/sambashare/filesite path = /var/www/sambashare/filesite
browseable = yes browseable = yes
read only = no read only = no
force create mode = 0660 force create mode = 0665
force directory mode = 0777 force directory mode = 0775
force group = apache
valid users = filesite @sambashare valid users = filesite @sambashare

Loading…
Cancel
Save