slackware docker

by mdeanda
3 deployments · 1 still active · last rev. 1 year ago

updates slackware install and adds needed libraries to build and run docker using sbopkg to build it.

Compatible with: Slackware 14.1
						#!/bin/sh
#
# docker stackscript for slackware instance
#
# maintained by miguel@thedeanda.com
#

echo "BATCH=on" >> /etc/slackpkg/slackpkg.conf
echo "DEFAULT_ANSWER=y" >> /etc/slackpkg/slackpkg.conf
echo "kdei" >> /etc/slackpkg/blacklist


cat << EOF > /etc/hosts
127.0.0.1 localhost localhost.localdomain
EOF

slackpkg update
slackpkg upgrade-all
slackpkg update
slackpkg install rsync
slackpkg install sasl
slackpkg install gcc
slackpkg install autoconf
slackpkg install automake
slackpkg install autoconf
slackpkg install libmpc
slackpkg install kernel-headers
slackpkg install sqlite
slackpkg install libcgroup

mkdir -p /var/lib/sbopkg/SBo/14.1
mkdir -p /var/lib/sbopkg/queues
mkdir -p /var/cache/sbopkg
mkdir -p /tmp/SBo
mkdir -p /var/log/sbopkg

wget http://sbopkg.googlecode.com/files/sbopkg-0.37.0-noarch-1_cng.tgz
installpkg *.t?z
rm *.t?z

sbopkg -r

sbopkg -B -i google-go-lang

#docker stuff
groupadd -r -g 281 docker
cat << EOF >> /etc/fstab
cgroup /cgroup/cpuset cgroup rw,relatime,cpuset 0 0
cgroup /cgroup/cpu cgroup rw,relatime,cpu 0 0
cgroup /cgroup/cpuacct cgroup rw,relatime,cpuacct 0 0
cgroup /cgroup/memory cgroup rw,relatime,memory 0 0
cgroup /cgroup/devices cgroup rw,relatime,devices 0 0
cgroup /cgroup/freezer cgroup rw,relatime,freezer 0 0
cgroup /cgroup/net_cls cgroup rw,relatime,net_cls 0 0
cgroup /cgroup/blkio cgroup rw,relatime,blkio 0 0
EOF
cat << EOF >> /etc/rc.d/rc.local
if [ -x /etc/rc.d/rc.docker ]; then
    /etc/rc.d/rc.docker start
fi
EOF
cat << EOF >> /etc/rc.d/rc.local_shutdown
if [ -x /etc/rc.d/rc.docker ]; then
    /etc/rc.d/rc.docker stop
fi
EOF
chmod +x /etc/rc.d/rc.local_shutdown
sbopkg -B -i docker