1. pull image, create container and enter the container
docker pull centos
# without --privileged=true, executing "systemctl start sshd.service" will occur the error "system has not been booted with systemd as init system"
docker run -p 8022:22 -p 139:139 -p 445:445 -itd --name fireware --privileged=true centos /sbin/init
docker exec -it fireware bash
2. execute command in the container
2.1 install language pack
locale -a
yum install -y glibc-langpack-en
locale -a
2.2 install libraries
yum install -y passwd net-tools git bzip2 make samba automake
2.3 install sshd
yum install -y openssl openssh-server
# don't need modify to "PermitRootLogin yes", because it's always that
# vim /etc/ssh/sshd_config
systemctl start sshd.service
systemctl enable sshd.service
# set the password for user root
passwd root
2.4 create user and group
useradd -d /home/ljh -s /sbin/nologin ljh
2.5 config samba
# add user for samba
pdbedit -a -u ljh
# add share folder in config file
# [codes]
# comment = codes for SC08S
# path = /home/ljh
# writable = yes
# public = no
vi /etc/samba/smb.conf
# start smb
systemctl start smb
systemctl enable smb
# modify selinux, change enforcing to disabled
vi /etc/sysconfig/selinux
# setlinux
setenforce 0;
2.6 get codes from git
# get codes from git server
cd /home/ljh
git clone http://xxx:81/xxx/parker_EX
# change folder parker_EX's owner
chown -Rf ljh:ljh /home/ljh
2.7 mdofiy ev200 compilation environment
# install arm-himix100-linux
tar xzvf arm-himix100-linux.tgz
cd xzvf arm-himix100-linux
./arm-himix100-linux.install
# add path
export PATH=/opt/hisi-linux/x86-arm/arm-himix100-linux/bin:$PATH
# test
arm-himix100-linux-gcc -v
# make clean & make
cd /home/ljh/parker_EX/app/mainApp
make clean
make
2.8 visit the share folder through samba in windows
my computer (right click) -> map network driver -> folder (\\192.168.0.21\codes)
if you didn't add config section information [codes] in file /etc/samba/smb.conf then you can only access \\192.168.0.21\ljh, otherwise you can also access \\192.168.0.21\codes