0% found this document useful (0 votes)
129 views

Slackware Docker Image Overview

This document provides an overview of Slackware Docker images. It describes how to build Slackware Docker images using the mkimage-slackware.sh script. Example Dockerfiles are provided to show how to create images with Slackpkg+ and Nginx installed. Available tags include Slackware64 13.37, 14.0, 14.1, 14.2, current, and latest.

Uploaded by

michele.b26
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views

Slackware Docker Image Overview

This document provides an overview of Slackware Docker images. It describes how to build Slackware Docker images using the mkimage-slackware.sh script. Example Dockerfiles are provided to show how to create images with Slackpkg+ and Nginx installed. Available tags include Slackware64 13.37, 14.0, 14.1, 14.2, current, and latest.

Uploaded by

michele.b26
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

2019/09/29 00:58 (UTC) 1/4 Slackware Docker Image Overview

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

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

SlackDocs - https://docs.slackware.com/
Last update: 2018/09/17 21:24
howtos:misc:slackware_docker_image https://docs.slackware.com/howtos:misc:slackware_docker_image
(UTC)

Examples
Slackware docker container with slackpkg+ 2)

FROM vbatts/slackware

# install slackpkg+
#
http://ufpr.dl.sourceforge.net/project/slackpkgplus/slackpkg%2B-1.6.1p2-noar
ch-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-noar
ch-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 <[email protected]>

# 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 && \

https://docs.slackware.com/ Printed on 2019/09/29 00:58 (UTC)


2019/09/29 00:58 (UTC) 3/4 Slackware Docker Image Overview

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, docker, image, author lamerix


1)

see http://docs.docker.com/reference/builder/ for more info on that


2)

File from https://github.com/lotabout/docker-slackware/blob/master/slackware-slackpkgplus/Dockerfile


3)

SlackDocs - https://docs.slackware.com/
Last update: 2018/09/17 21:24
howtos:misc:slackware_docker_image https://docs.slackware.com/howtos:misc:slackware_docker_image
(UTC)

File from https://github.com/josemrb/docker-slackware/blob/develop/nginx/Dockerfile

From:
https://docs.slackware.com/ - SlackDocs

Permanent link:
https://docs.slackware.com/howtos:misc:slackware_docker_image

Last update: 2018/09/17 21:24 (UTC)

https://docs.slackware.com/ Printed on 2019/09/29 00:58 (UTC)

You might also like