u
This commit is contained in:
parent
ca0c7fcffc
commit
83dc20e502
@ -2,7 +2,7 @@ FROM debian:11.5
|
|||||||
LABEL org.opencontainers.image.authors="luk"
|
LABEL org.opencontainers.image.authors="luk"
|
||||||
|
|
||||||
RUN apt update && apt install curl -y
|
RUN apt update && apt install curl -y
|
||||||
RUN curl https://git.faronear.org/fon/sysconfig/raw/branch/main/debian-setup.sh > ~/debian-setup.sh && echo -e "l\n\n\n\n\n" | bash ~/debian-setup.sh
|
RUN curl https://git.faronear.org/npm/sysconfig/raw/branch/main/debian-setup.sh > ~/debian-setup.sh && echo -e "l\n\n\n\n\n" | bash ~/debian-setup.sh
|
||||||
|
|
||||||
CMD bash
|
CMD bash
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
echo "Usage: this.sh [NewUser]"
|
echo "Usage: this.sh [NewUser]"
|
||||||
echo "Example: this.sh alice"
|
echo "Example: this.sh alice"
|
||||||
echo "curl https://git.faronear.org/fon/sysconfig/raw/branch/main/debian-setup.sh > ~/debian-setup.sh && bash ~/debian-setup.sh"
|
echo "curl https://git.faronear.org/npm/sysconfig/raw/branch/main/debian-setup.sh > ~/debian-setup.sh && bash ~/debian-setup.sh"
|
||||||
|
|
||||||
if [ "$1" ]
|
if [ "$1" ]
|
||||||
then
|
then
|
||||||
@ -24,13 +24,13 @@ echo "=== Git cloning to /faronear/sysconfig"
|
|||||||
git config --global credential.helper cache
|
git config --global credential.helper cache
|
||||||
if [ ! -d "/faronear/sysconfig" ]
|
if [ ! -d "/faronear/sysconfig" ]
|
||||||
then
|
then
|
||||||
git clone https://git.faronear.org/fon/sysconfig /faronear/sysconfig
|
git clone https://git.faronear.org/npm/sysconfig /faronear/sysconfig
|
||||||
chmod -R 755 /faronear # 确保其他用户能够读取 /faronear/sysconfig/nixhome/*
|
chmod -R 755 /faronear # 确保其他用户能够读取 /faronear/sysconfig/nixhome/*
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "=== Configure root home"
|
echo "=== Configure root home"
|
||||||
source /faronear/sysconfig/home-config.sh /faronear/sysconfig/nixhome root
|
source /faronear/sysconfig/nixhome-config.sh /faronear/sysconfig/nixhome root
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "=== Change root password? <y> for yes, <anything else> for omit:"
|
echo "=== Change root password? <y> for yes, <anything else> for omit:"
|
||||||
@ -105,7 +105,7 @@ read -p ">>> " AddNewUser
|
|||||||
if [ "$AddNewUser" == 'y' ]
|
if [ "$AddNewUser" == 'y' ]
|
||||||
then
|
then
|
||||||
source /faronear/sysconfig/debian-add-user.sh $NewUser
|
source /faronear/sysconfig/debian-add-user.sh $NewUser
|
||||||
source /faronear/sysconfig/home-config.sh /faronear/sysconfig/nixhome $NewUser
|
source /faronear/sysconfig/nixhome-config.sh /faronear/sysconfig/nixhome $NewUser
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "=== Enable xfce autologin [/etc/lightdm/lightdm.conf]: <y> for autologin as [$NewUser] or <anything else> for no change:"
|
echo "=== Enable xfce autologin [/etc/lightdm/lightdm.conf]: <y> for autologin as [$NewUser] or <anything else> for no change:"
|
||||||
|
@ -37,7 +37,7 @@ if [ $targetUrl ]
|
|||||||
then
|
then
|
||||||
read -p "Enter adot password (ROAD) >>" PWD_ADOT
|
read -p "Enter adot password (ROAD) >>" PWD_ADOT
|
||||||
read -p "Enter root password (YU) >>" PWD_ROOT
|
read -p "Enter root password (YU) >>" PWD_ROOT
|
||||||
expect ~/faronear/fon/sysconfig/expect-ssh.sh $targetUrl adot $PWD_ADOT $PWD_ADOT
|
expect ~/faronear/npm/sysconfig/expect-ssh.sh $targetUrl adot $PWD_ADOT $PWD_ADOT
|
||||||
else
|
else
|
||||||
while [ ! "$HOST" ]
|
while [ ! "$HOST" ]
|
||||||
do
|
do
|
||||||
@ -59,5 +59,5 @@ else
|
|||||||
read -p "root password = " ROOT_SU
|
read -p "root password = " ROOT_SU
|
||||||
done
|
done
|
||||||
|
|
||||||
expect ~/faronear/fon/sysconfig/expect-ssh.sh $HOST $USER $PWD_USER $PWD_SU
|
expect ~/faronear/npm/sysconfig/expect-ssh.sh $HOST $USER $PWD_USER $PWD_SU
|
||||||
fi
|
fi
|
||||||
|
@ -8,7 +8,7 @@ popd
|
|||||||
|
|
||||||
mkdir fon.git
|
mkdir fon.git
|
||||||
pushd fon.git
|
pushd fon.git
|
||||||
git clone https://git.faronear.org/fon/sysconfig
|
git clone https://git.faronear.org/npm/sysconfig
|
||||||
git clone https://git.faronear.org/fon/dot.vscode
|
git clone https://git.faronear.org/fon/dot.vscode
|
||||||
git clone https://git.faronear.org/fon/www.faronear.com
|
git clone https://git.faronear.org/fon/www.faronear.com
|
||||||
git clone https://git.faronear.org/fon/yapi.faronear.org
|
git clone https://git.faronear.org/fon/yapi.faronear.org
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
curl -sSL https://git.faronear.org/fon/sysconfig/raw/branch/main/nixhome/.bashrc > ~/.bashrc
|
|
||||||
curl -sSL https://git.faronear.org/fon/sysconfig/raw/branch/main/nixhome/.emacs > ~/.emacs
|
|
13
home-config.sh → nixhome-config.sh
Executable file → Normal file
13
home-config.sh → nixhome-config.sh
Executable file → Normal file
@ -1,10 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
NIXHOME0=/faronear/sysconfig/nixhome
|
NIXHOME0=/faronear/sysconfig/nixhome
|
||||||
NIXHOME1=/faronear/fon/sysconfig/nixhome
|
NIXHOME1=/faronear/npm/sysconfig/nixhome
|
||||||
NIXHOME2=~/faronear/fon/sysconfig/nixhome
|
NIXHOME2=~/faronear/npm/sysconfig/nixhome
|
||||||
NIXHOME3=~/faronear/fon.git/sysconfig/nixhome
|
NIXHOME3=~/faronear/npm.git/sysconfig/nixhome
|
||||||
NIXHOME4=~/faronear.git/fon.git/sysconfig/nixhome
|
NIXHOME4=~/faronear.git/npm.git/sysconfig/nixhome
|
||||||
NIXHOME5=`pwd`/nixhome
|
NIXHOME5=`pwd`/nixhome
|
||||||
|
|
||||||
if [ "$1" ]
|
if [ "$1" ]
|
||||||
@ -92,7 +92,10 @@ then
|
|||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if [ "$TheUser" != 'root' ] && [ "$(uname)" != "Darwin" ] # 仅允许 non-root 用户进行远程密钥登录
|
if [ "$(uname)" == "Darwin" ]
|
||||||
|
then
|
||||||
|
echo '--- No need to run this script on Mac OS X. Exit now.'
|
||||||
|
elif [ "$TheUser" != 'root' ] # 仅允许 non-root 用户进行远程密钥登录
|
||||||
then
|
then
|
||||||
|
|
||||||
mkdir -p $HomePath/.ssh
|
mkdir -p $HomePath/.ssh
|
2
nixhome-import.sh
Normal file
2
nixhome-import.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
curl -sSL https://git.faronear.org/npm/sysconfig/raw/branch/main/nixhome/.bashrc > ~/.bashrc
|
||||||
|
curl -sSL https://git.faronear.org/npm/sysconfig/raw/branch/main/nixhome/.emacs > ~/.emacs
|
@ -158,12 +158,12 @@ fi
|
|||||||
export USERPROFILE=$HOME
|
export USERPROFILE=$HOME
|
||||||
|
|
||||||
# add sysconfig to path
|
# add sysconfig to path
|
||||||
tp1=/Users/luk.lu/faronear/fon/sysconfig
|
tp1=/Users/luk.lu/faronear/npm/sysconfig
|
||||||
tp2=/Users/luk.lu/faronear/fon.git/sysconfig
|
tp2=/Users/luk.lu/faronear/npm.git/sysconfig
|
||||||
tp3=/faronear/fon/sysconfig
|
tp3=/faronear/npm/sysconfig
|
||||||
tp4=/faronear/fon.git/sysconfig
|
tp4=/faronear/npm.git/sysconfig
|
||||||
tp5=/mnt/c/faronear/fon.git/sysconfig
|
tp5=/mnt/c/faronear/npm.git/sysconfig
|
||||||
tp6=/mnt/d/faronear/fon.git/sysconfig
|
tp6=/mnt/d/faronear/npm.git/sysconfig
|
||||||
tp7=/faronear/sysconfig
|
tp7=/faronear/sysconfig
|
||||||
if [ -d $tp1 ]
|
if [ -d $tp1 ]
|
||||||
then
|
then
|
||||||
|
@ -38,6 +38,6 @@ popd
|
|||||||
|
|
||||||
# sudo apt install nginx -y
|
# sudo apt install nginx -y
|
||||||
# rm -fr /etc/nginx/sites-enabled/default
|
# rm -fr /etc/nginx/sites-enabled/default
|
||||||
# cp /faronear/fon/sysconfig/seafile-nginx-http.conf /faronear/bin-seafile/
|
# cp /faronear/npm/sysconfig/seafile-nginx-http.conf /faronear/bin-seafile/
|
||||||
# ln -s /faronear/bin-seafile/seafile-nginx-http.conf /etc/nginx/sites-enabled/
|
# ln -s /faronear/bin-seafile/seafile-nginx-http.conf /etc/nginx/sites-enabled/
|
||||||
# service nginx restart
|
# service nginx restart
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
FROM node:16.18-bullseye
|
FROM arm64v8/node:16.18-bullseye
|
||||||
LABEL org.opencontainers.image.authors="luk"
|
LABEL org.opencontainers.image.authors="luk"
|
||||||
|
|
||||||
RUN npm i -g --registry https://registry.npm.taobao.org @vue/cli@4
|
RUN npm i -g --registry https://registry.npm.taobao.org @vue/cli@4
|
||||||
RUN cd / && echo -e "\n" | vue create --registry https://registry.npm.taobao.org -p dcloudio/uni-preset-vue uniapp-cli
|
RUN cd / && echo -e "\n" | vue create --registry https://registry.npm.taobao.org -p dcloudio/uni-preset-vue uniapp-cli
|
||||||
# 上一行自动选择了第一个空模板,因此需要额外按照 sass
|
# 上一行自动选择了第一个空模板,因此需要额外安装 sass
|
||||||
RUN cd /uniapp-cli && npm i -D --registry https://registry.npm.taobao.org sass@1.49.8 sass-loader@8.0.2
|
RUN cd /uniapp-cli && npm i -D --registry https://registry.npm.taobao.org sass@1.49.8 sass-loader@8.0.2
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
Loading…
Reference in New Issue
Block a user