bit of progress
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
294ce3a2ae
commit
914773cd50
|
@ -7,6 +7,8 @@ steps:
|
|||
network_mode: bridge
|
||||
settings:
|
||||
repo: datavibe/shell
|
||||
build_args:
|
||||
- UBUNTU_MIRROR=http://ubuntu.datavi.be/ubuntu
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
|
|
25
Dockerfile
25
Dockerfile
|
@ -1,19 +1,38 @@
|
|||
# focal 2020.01 dev
|
||||
FROM ubuntu@sha256:d050ed7278c16ff627e4a70d7d353f1a2ec74d8a0b66e5a865356d92f5f6d87b
|
||||
|
||||
ADD ./sources.list /etc/apt/sources.list
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
ARG UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu
|
||||
|
||||
RUN echo "deb $UBUNTU_MIRROR focal main universe restricted multiverse" > /etc/apt/sources.list.new && \
|
||||
echo "deb $UBUNTU_MIRROR focal-updates main universe restricted multiverse" >> /etc/apt/sources.list.new && \
|
||||
echo "deb $UBUNTU_MIRROR focal-security main universe restricted multiverse" >> /etc/apt/sources.list.new && \
|
||||
echo "deb $UBUNTU_MIRROR focal-backports main universe restricted multiverse" >> /etc/apt/sources.list.new && \
|
||||
mv /etc/apt/sources.list.new /etc/apt/sources.list
|
||||
|
||||
ADD https://sneak.cloud/authorized_keys /root/.ssh/authorized_keys
|
||||
|
||||
COPY ./root /tmp/rootoverlay
|
||||
|
||||
# we only install essential system packages here
|
||||
ARG SYSTEM_PACKAGES="runit build-essential rsync ca-certificates"
|
||||
ARG SYSTEM_PACKAGES="build-essential ca-certificates openssh-server git golang rsync runit"
|
||||
|
||||
RUN \
|
||||
apt update && \
|
||||
apt -y upgrade && \
|
||||
apt -y install $SYSTEM_PACKAGES && \
|
||||
rsync -avP /tmp/rootoverlay/ / && \
|
||||
rm -rf /tmp/rootoverlay
|
||||
rm -rf /tmp/rootoverlay && \
|
||||
go get -v -u github.com/peterbourgon/runsvinit && \
|
||||
cp /root/go/bin/runsvinit /usr/local/sbin/runsvinit && \
|
||||
rm -r /root/go && \
|
||||
rm /etc/ssh/*host*key*
|
||||
|
||||
COPY ./run.sh /tmp/run.sh
|
||||
|
||||
RUN /bin/bash /tmp/run.sh && rm /tmp/run.sh
|
||||
|
||||
EXPOSE 22
|
||||
|
||||
CMD ["/usr/local/sbin/runsvinit"]
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
default: build
|
||||
|
||||
|
||||
build:
|
||||
docker build --build-arg UBUNTU_MIRROR="http://ubuntu.datavi.be/ubuntu" .
|
|
@ -1,4 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ ! -e /etc/ssh/ssh_host_rsa_key ]]; then
|
||||
echo "No SSH host key available. Generating one..."
|
||||
export LC_ALL=C
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
dpkg-reconfigure openssh-server
|
||||
fi
|
||||
|
||||
if [[ ! -d /run/sshd ]]; then
|
||||
mkdir -p /run/sshd
|
||||
fi
|
||||
|
||||
set -e
|
||||
exec /usr/sbin/sshd -D
|
||||
|
|
29
run.sh
29
run.sh
|
@ -1,16 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
# nonessential packages
|
||||
PACKAGES="
|
||||
weechat
|
||||
bundler
|
||||
byobu
|
||||
ctags
|
||||
irssi
|
||||
irssi-scripts
|
||||
jq
|
||||
magic-wormhole
|
||||
pbzip2
|
||||
pv
|
||||
python3
|
||||
python3-dev
|
||||
python3-pip
|
||||
ruby-dev
|
||||
screen
|
||||
socat
|
||||
tmux
|
||||
tor
|
||||
vim
|
||||
vim-doc
|
||||
vim-scripts
|
||||
weechat
|
||||
weechat-doc
|
||||
weechat-scripts
|
||||
"
|
||||
|
||||
for PKG in $PACKAGES ; do
|
||||
apt install -y $PKG
|
||||
done
|
||||
apt install -y $PACKAGES
|
||||
|
||||
pip3 install --upgrade youtube_dl
|
||||
|
||||
|
@ -18,3 +37,5 @@ cp /etc/passwd /etc/passwd.dist
|
|||
cp /etc/shadow /etc/shadow.dist
|
||||
|
||||
chmod +x /etc/service/*/run
|
||||
|
||||
# FIXME cp runsvinit to /sbin and set it as CMD
|
||||
|
|
Loading…
Reference in New Issue