[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

This is an old revision of the document!


Slackware Docker Image Overview

Slackware docker images are available in the docker image registry.
They can be found in hub.docker.com/r/vbatts

Building the images

You can clone the git repository from 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 1)

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

This is this build process used to be the base of vbatts/slackware on the http://index.docker.io/

Just running:

$ 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+ 2)
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 3)
FROM vbatts/slackware:current
MAINTAINER josemrb <work@josemrb.com>

# 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 lamerix
* Based on Vincent Batts's github README github.com/vbatts/slackware-docker
* Docker registry page hub.docker.com/r/vbatts/slackware

 howtos:misc:slackware_docker_image ()