Skip to content

Commit 96e27af

Browse files
use oraclelinux:8 as base image, update python modules
mktools-3.0 image is build based on this docker file. Python modules do not use latest version anymore. This allows to build a compatible docker image anytime locally-
1 parent d32ae90 commit 96e27af

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

docker/Dockerfile

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1-
FROM centos:8
1+
FROM oraclelinux:8
22

33
LABEL maintainer="philipp.salvisberg@trivadis.com"
44
LABEL description="Tools to generate HTML and PDF using Materials for MkDocs and wkhtmltopdf."
55
LABEL build.command="docker build . --tag trivadis/mktools:latest"
66

7-
# install python, not part of centos
8-
# see https://computingforgeeks.com/how-to-install-python-on-3-on-centos/
9-
RUN yum -y update
10-
RUN yum -y groupinstall "Development Tools"
11-
RUN yum -y install openssl-devel bzip2-devel libffi-devel
12-
RUN yum -y install wget
13-
RUN wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz
14-
RUN tar xvf Python-3.8.3.tgz
15-
RUN /bin/bash -c 'cd Python-3.8*/; ./configure --enable-optimizations; make altinstall'
7+
# install python
8+
RUN dnf -y update
9+
RUN dnf -y install python38 python38-pip
1610

1711
# install git
18-
RUN yum install -y git
19-
20-
# install python modules (most recent versions)
21-
RUN pip3.8 install --upgrade pip
22-
RUN pip3.8 install mkdocs \
23-
mkdocs-material \
24-
mkdocs-awesome-pages-plugin \
25-
pymdown-extensions \
26-
mike
12+
RUN dnf -y install git
13+
14+
# install python modules
15+
# using "--root" should suppress "WARNING: Running pip install with root privileges is generally not a good idea." in future releases
16+
RUN python3 -m pip install --upgrade pip --root /
17+
RUN python3 -m pip install --root / \
18+
'mkdocs==1.1.2' \
19+
'mkdocs-material==6.2.8' \
20+
'mkdocs-awesome-pages-plugin==2.5.0' \
21+
'pymdown-extensions==8.1.1' \
22+
'mike==0.5.5'
2723

2824
# install wkhtmltox 0.12.6
29-
RUN yum install -y https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos8.x86_64.rpm
25+
RUN dnf -y install https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos8.x86_64.rpm
3026

3127
# set environment
3228
ENV LANG=en_US.utf8

0 commit comments

Comments
 (0)