rename setup dir to build
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-04-11 12:09:15 -07:00
parent 9e04a5fdf7
commit 07788af7cc
4 changed files with 2 additions and 2 deletions

109
build/packages.txt Normal file
View File

@@ -0,0 +1,109 @@
apt-transport-https
apt-utils
aspell
aspell-en
automake
bash-completion
bc
bind9-host
bonnie++
build-essential
byobu
ca-certificates
cmake
command-not-found
curl
daemontools
debmirror
default-jre
diffstat
dnsutils
docker.io
dos2unix
editorconfig
ffmpeg
fonts-indic
fonts-ipafont-gothic
fonts-ipafont-mincho
fortune
git
gnupg2
gnupg-agent
golang-go
host
imagemagick
iputils-ping
irssi
jq
lcov
ldap-auth-client
ldap-utils
libasound2
libatk1.0-0
libboost-all-dev
libdb++-dev
libgconf-2-4
libgtk-3-0
libjpeg-dev
libnss3
libnss-mdns
libpng-dev
libssl-dev
libtool
libxcursor1
libxml2
libxml2-dev
libxslt1-dev
locales
lsof
mailutils
make
man
man-db
mercurial
mosh
mutt
netcat-openbsd
nmap
nscd
openssh-server
pandoc
pass
pbzip2
pinentry-curses
pkg-config
psmisc
pv
pwgen
python3
python3-dev
python3-pip
rbenv
rsync
rsyslog
rsyslog-gnutls
rsyslog-relp
runit
screen
snmp
snmpd
socat
software-properties-common
strace
sudo
tcpdump
telnet
texlive-latex-base
tmux
tree
ttf-wqy-microhei
ttf-wqy-zenhei
vagrant
vim
vim-gtk
wamerican-insane
wget
xterm
zfsutils-linux
zip
zsh

31
build/run.sh Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
cd "$TD"
apt install -y $(cat packages.txt)
SSH_HOST_KEY_FILES="
ssh_host_ecdsa_key
ssh_host_ecdsa_key.pub
ssh_host_ed25519_key
ssh_host_ed25519_key.pub
ssh_host_rsa_key
ssh_host_rsa_key.pub
"
for FN in $SSH_HOST_KEY_FILES ; do
ln -s /hostroot/etc/ssh/$FN /etc/ssh/$FN
done
# install other stuff here
# update pip
# install black
# install python packages
# install yarn
# install prettier
# install vim-go
sudo -u $USERNAME_TO_ADD bash ./runuser.sh

26
build/runuser.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
TD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
# original home
OH="/hostroot/home/$USER_TO_ADD"
# container home
export HOME="/home/$USER_TO_ADD"
rsync -avP /home/template/ $HOME/
# link ~/.home to original home
ln -s "/hostroot/home/$USER_TO_ADD" $HOME/.home
# oh-my-zsh
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > /tmp/installomz.sh
export ZSH="$HOME/.zsh"
bash /tmp/installomz.sh --unattended --keep-zshrc
# link in ssh key from original home
ln -s ~/.home/.ssh/id_rsa ~/.ssh/id_rsa
ln -s ~/.home/.ssh/id_rsa.pub ~/.ssh/id_rsa.pub
# move this to runtime
#DEVDIR="$( cd ~/.home/dev >/dev/null 2>&1 && pwd -P)"