latest, seems to sort of work
This commit is contained in:
parent
b8d90f2f8f
commit
a1485030e8
@ -11,4 +11,9 @@ RUN bash /tmp/run.sh && rm /tmp/run.sh
|
|||||||
RUN rm -f /etc/service/sshd/down
|
RUN rm -f /etc/service/sshd/down
|
||||||
|
|
||||||
#cleanup
|
#cleanup
|
||||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
RUN apt-get clean && \
|
||||||
|
rm -rf \
|
||||||
|
/var/lib/apt/lists/* \
|
||||||
|
/tmp/* \
|
||||||
|
/var/tmp/* \
|
||||||
|
/etc/ssh/ssh_host_*_key
|
||||||
|
7
Makefile
7
Makefile
@ -4,9 +4,4 @@ BRANCH := $(shell git branch | sed -n -e 's/^\* \(.*\)/\1/p')
|
|||||||
default: build
|
default: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
script -q ./build.log docker build --no-cache -t sneak/sandbox .
|
script -q ./build.log docker build --no-cache -t sneak/sandbox:$(YYYYMMDD) .
|
||||||
docker tag sneak/sandbox sneak/sandbox:$(YYYYMMDD)
|
|
||||||
|
|
||||||
push:
|
|
||||||
docker push sneak/sandbox
|
|
||||||
docker push sneak/sandbox:$(YYYYMMDD)
|
|
||||||
|
26
run.sh
26
run.sh
@ -128,10 +128,26 @@ apt update
|
|||||||
apt install -y neovim
|
apt install -y neovim
|
||||||
|
|
||||||
mkdir -p /etc/bashrc.d
|
mkdir -p /etc/bashrc.d
|
||||||
cat >> /etc/skel/.bashrc <<'EOF'
|
mkdir -p /etc/profile.d
|
||||||
|
|
||||||
|
cat >> /etc/bash.bashrc <<'EOF'
|
||||||
|
if ! shopt -oq posix; then
|
||||||
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
elif [ -f /etc/bash_completion ]; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
for FN in /etc/bashrc.d/*.sh; do
|
for FN in /etc/bashrc.d/*.sh; do
|
||||||
source "$FN"
|
source "$FN"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if ! shopt -oq posix; then
|
||||||
|
for FN in /etc/profile.d/*.sh; do
|
||||||
|
source "$FN"
|
||||||
|
done
|
||||||
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -141,7 +157,9 @@ EOF
|
|||||||
export NVM_DIR='/usr/local/nvm'
|
export NVM_DIR='/usr/local/nvm'
|
||||||
mkdir -p "$NVM_DIR"
|
mkdir -p "$NVM_DIR"
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
|
||||||
echo 'source /usr/local/nvm/nvm.sh' > /etc/bashrc.d/100.nvm.sh
|
cat > /etc/bashrc.d/100.nvm.sh <<'EOF'
|
||||||
|
source /usr/local/nvm/nvm.sh
|
||||||
|
EOF
|
||||||
source /etc/bashrc.d/100.nvm.sh
|
source /etc/bashrc.d/100.nvm.sh
|
||||||
|
|
||||||
nvm install node
|
nvm install node
|
||||||
@ -210,6 +228,10 @@ for PKG in $PIP_PKGS; do
|
|||||||
pip3 install $PKG
|
pip3 install $PKG
|
||||||
done
|
done
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## add working user and add to sudo nopassword
|
||||||
|
################################################################################
|
||||||
groupadd -g 1000 $USERNAME
|
groupadd -g 1000 $USERNAME
|
||||||
useradd -u 1000 -g 1000 -s /bin/bash $USERNAME
|
useradd -u 1000 -g 1000 -s /bin/bash $USERNAME
|
||||||
usermod -p '*' $USERNAME
|
usermod -p '*' $USERNAME
|
||||||
|
echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
Loading…
Reference in New Issue
Block a user