Skip to content

Commit 32e3884

Browse files
author
Steve Jeong
committed
workspace v3.0.0 beta 2
Signed-off-by: Steve Jeong <[email protected]>
1 parent a9cc273 commit 32e3884

File tree

4 files changed

+28
-39
lines changed

4 files changed

+28
-39
lines changed

docker/base/fixups/global

Lines changed: 0 additions & 3 deletions
This file was deleted.

docker/base/fixups/postfix

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,29 @@
44
# written by how2flow(Steve Jeong).
55

66
ID="${1:-user}"
7-
GROUP="${2:-user}"
8-
PASSWORD="${3:-docker}"
7+
PASSWORD="${2:-docker}"
8+
GROUP="${3:-user}"
99

10-
ROOT="$(cd $(dirname $0); pwd -P )"
11-
. "${ROOT}"/global
12-
13-
get_app_configs() {
10+
download_app_configs() {
1411
local home="/home/"${ID}""
1512

16-
# move configs
17-
if [[ -d "${CONFDIR}" && -d "${home}" ]]; then
18-
mv "${CONFDIR}"/* "${home}"
13+
if [ ! -d "${home}" ]; then
14+
echo "There is no account..."
1915
fi
2016

21-
rm -rf "${CONFDIR}"
17+
# download configs
18+
if [ -x "$(command -v wget)" ]; then
19+
wget -O "${home}"/.gitconfig $WGET_FLAG "https://raw.githubusercontent.com/how2flow/config/master/ubuntu/gitconfig"
20+
wget -O "${home}"/.tmux.conf $WGET_FLAG "https://raw.githubusercontent.com/how2flow/config/master/ubuntu/tmux.conf"
21+
wget -O "${home}"/.vimrc $WGET_FLAG "https://raw.githubusercontent.com/how2flow/config/master/ubuntu/vimrc"
22+
23+
# download configs for vim plugin.
24+
mkdir -p "${home}"/.vim/colors "${CONFDIR}"/.vim/bundle
25+
echo "git 1"
26+
git clone "https://github.com/VundleVim/Vundle.vim.git" "${home}"/.vim/bundle/Vundle.vim
27+
echo "git 2"
28+
wget -O "${home}"/.vim/colors/gruvbox.vim $WGET_FLAG "https://raw.githubusercontent.com/morhetz/gruvbox/master/colors/gruvbox.vim"
29+
fi
2230

2331
echo "Finish Download app configs"
2432
}
@@ -45,8 +53,8 @@ rc_config() {
4553

4654
# bashrc user confs
4755
if [ -f "${bashrc}" ]; then
48-
echo "alias tmux='tmux -2'" >> "${bashrc}" /dev/null 2>&1
49-
echo "set -o vi" >> "${bashrc}" /dev/null 2>&1
56+
echo "alias tmux='tmux -2'" >> "${bashrc}" > /dev/null 2>&1
57+
echo "set -o vi" >> "${bashrc}" > /dev/null 2>&1
5058
fi
5159

5260
echo "Finish rc config"
@@ -62,7 +70,7 @@ sudo_config() {
6270
fi
6371

6472
# sudoers config
65-
echo "%$id ALL=(ALL) ALL" >> "${sudoers_conf}"
73+
echo "%$ID ALL=(ALL) ALL" >> "${sudoers_conf}"
6674

6775
echo "Finish sudo config"
6876
}
@@ -71,7 +79,7 @@ main() {
7179
id_config
7280
rc_config
7381
sudo_config
74-
get_app_configs
82+
download_app_configs
7583
}
7684

7785
main

docker/base/fixups/prefix

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,12 @@
33
# configs after preinst.
44
# written by how2flow(Steve Jeong).
55

6-
ROOT="$(cd $(dirname $0); pwd -P )"
7-
8-
. "${ROOT}"/global
9-
10-
downlaod_app_configs() {
11-
# download configs
12-
if [ -x "$(command -v wget)" ]; then
13-
mkdir -p "${CONFDIR}"
14-
wget -O "${CONFDIR}"/.gitconfig $WGET_FLAG "https://raw.githubusercontent.com/how2flow/config/master/ubuntu/gitconfig"
15-
wget -O "${CONFDIR}"/.tmux.conf $WGET_FLAG "https://raw.githubusercontent.com/how2flow/config/master/ubuntu/tmux.conf"
16-
git clone "https://github.com/VundleVim/Vundle.vim.git" "${prefix}"/.vim/bundle/Vundle.vim
17-
18-
# download configs for vim
19-
mkdir -p "${CONFDIR}"/.vim/colors "${CONFDIR}"/.vim/bundle
20-
wget -O "${CONFDIR}"/.vimrc $WGET_FLAG "https://raw.githubusercontent.com/how2flow/config/master/ubuntu/vimrc"
21-
wget -O "${CONFDIR}"/.vim/colors/gruvbox.vim $WGET_FLAG "https://raw.githubusercontent.com/morhetz/gruvbox/master/colors/gruvbox.vim"
22-
fi
23-
}
24-
256
install_packages() {
267
# prefix pacakges: git sudo ssh tmux vim wget
278
apt-get update && apt-get install -y --no-install-recommends git sudo ssh tmux vim wget
9+
10+
# installl certificates
11+
apt-get install --reinstall -y ca-certificates
2812

2913
if [ -x "$(command -v brltty)" ]; then
3014
apt-get remove brltty
@@ -47,7 +31,6 @@ ssh_config() {
4731
main() {
4832
install_packages
4933
ssh_config
50-
downlaod_app_configs
5134
}
5235

5336
main

docker/jekyll/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
FROM how2flow/workspace:base
55
# ===================
66

7-
ENV ID="jekyll"
7+
ENV ID="jekyll" \
8+
PASSWORD="jekyll"
89

910
# ===== No Edit =====
1011
USER root
@@ -15,7 +16,7 @@ RUN chmod -R +x fixups
1516

1617
# ===== No Edit =====
1718
WORKDIR /root/fixups
18-
RUN ./postfix $ID
19+
RUN ./postfix $ID $PASSWORD
1920
# ===================
2021
# TODO ...
2122
RUN ./pkg

0 commit comments

Comments
 (0)