====== Slackware Docker Image Overview ======
Slackware docker images are available in the docker image registry. \\
They can be found in [[https://hub.docker.com/r/vbatts/slackware/|hub.docker.com/r/vbatts]]
====== Building the images ======
You can clone the git repository from [[https://github.com/vbatts/slackware-docker|github.com/vbatts/slackware-docker]] \\
Currently, using the installer bootstrap, the __mkimage-slackware.sh__ can create an ultra-minimal Slackware filesystem. (does not even include pkgtools)
$ sudo docker -d &
$ make image
And then you'll be able to run
$ sudo docker run -i -t $USER/slackware-base /bin/sh
//This will be the environment to build out the Dockerfile from// (( see http://docs.docker.com/reference/builder/ for more info on that ))
To build alternate versions of slackware, pass gnu-make the RELEASE variable, like:
$ make image RELEASE=slackware64-13.37 IMG_NAME=$HOME/my_slackware:13.37
====== Running Slackware in Docker ======
Running the Slackware docker image
$ docker run -i -t vbatts/slackware /bin/sh
====== Available tags/releases ======
Currently in the docker registry there are available images for:
* Slackware64 **13.37**
* Slackware64 **14.0**
* Slackware64 **14.1**
* Slackware64 **14.2**
* Slackware64 **current**
* Slackware64 **latest**
====== Examples ======
* Slackware docker container with slackpkg+ (( File from https://github.com/lotabout/docker-slackware/blob/master/slackware-slackpkgplus/Dockerfile ))
FROM vbatts/slackware
# install slackpkg+
# http://ufpr.dl.sourceforge.net/project/slackpkgplus/slackpkg%2B-1.6.1p2-noarch-2mt.txz
# should put the commands in oneline so that the 'rm' command will take effect
RUN wget http://ufpr.dl.sourceforge.net/project/slackpkgplus/slackpkg%2B-1.6.1p2-noarch-2mt.txz && installpkg slackpkg+-1.6.1p2-noarch-2mt.txz && rm slackpkg+-1.6.1p2-noarch-2mt.txz
# add repository: http://packages.slackonly.com/
RUN echo "MIRRORPLUS['slackonly']=http://slackonly.com/pub/packages/current-x86_64/" >> /etc/slackpkg/slackpkgplus.conf
RUN sed -i '/^REPOPLUS/s/)/slackonly )/' /etc/slackpkg/slackpkgplus.conf
# If your dockerfile based on this one, please add the following two commands
# RUN slackpkg update gpg
# RUN slackpkg update
* Slackware docker container with nginx (( File from https://github.com/josemrb/docker-slackware/blob/develop/nginx/Dockerfile ))
FROM vbatts/slackware:current
MAINTAINER josemrb
# update slackpg
RUN slackpkg update
# install dependencies
RUN \
slackpkg -batch=on -default_answer=y install sasl rsync-* glibc-* perl && \
slackpkg -batch=on -default_answer=y install autoconf automake binutils gettext-tools intltool kernel-headers libtool m4 make libmpc gcc-[0-9] gcc-g[+] && \
slackpkg -batch=on -default_answer=y install pcre zlib libxslt libxml2 shadow
# update sbopkg and build
RUN \
mkdir -p /tmp/install && cd /tmp/install && \
wget -c http://sbopkg.googlecode.com/files/sbopkg-0.37.0-noarch-1_cng.tgz && \
installpkg sbopkg-0.37.0-noarch-1_cng.tgz && \
mkdir -p /var/lib/sbopkg/SBo/14.1 && \
mkdir -p /var/lib/sbopkg/queues && \
mkdir -p /var/cache/sbopkg && \
mkdir -p /var/log/sbopkg && \
mkdir -p /tmp/SBo && \
sbopkg -r && \
sbopkg -B -i sbotools && \
sbosnap fetch && \
sboinstall -r GeoIP && \
groupadd -g 8080 www-data && \
useradd -g 8080 -u 8080 -M -s /bin/false www-data && \
USE_GEOIP=yes NGINXUSER=www-data NGINXGROUP=www-data sboinstall -r nginx && \
chown -R www-data:www-data /var/lib/nginx
# update script | add exec | run in foreground
RUN \
chmod +x /etc/rc.d/rc.nginx
# copy config file
COPY ./nginx.conf /etc/nginx/nginx.conf
# define mountable directories
VOLUME ["/etc/nginx", "/etc/nginx/conf.d", "/var/lib/nginx"]
# set port
EXPOSE 80
# start server
ENTRYPOINT /etc/rc.d/rc.nginx start
//Note that this dockerfile expects an **nginx.conf** in the local directory.//
====== Sources ======
* Originally written by [[wiki:user:lamerix | lamerix]] \\
* Based on Vincent Batts's github README [[https://github.com/vbatts/slackware-docker|github.com/vbatts/slackware-docker]] \\
* Docker registry page [[https://hub.docker.com/r/vbatts/slackware/|hub.docker.com/r/vbatts/slackware]] \\
{{tag>howtos docker image author_lamerix}}