| 1 |
FROM debian:latest@sha256:d07d1b51c39f51188e60be9b64e6bf769fa94e187f092bc32b91305cfa34ba5a |
| 2 |
|
| 3 |
LABEL maintainer="Liblouis Maintainers <[email protected]>" |
| 4 |
|
| 5 |
# Fetch build dependencies |
| 6 |
RUN apt-get update && apt-get install -y \ |
| 7 |
autoconf \ |
| 8 |
automake \ |
| 9 |
curl \ |
| 10 |
libtool \ |
| 11 |
libyaml-dev \ |
| 12 |
make \ |
| 13 |
pkg-config \ |
| 14 |
python3 \ |
| 15 |
python3-pip \ |
| 16 |
python3-setuptools \ |
| 17 |
python3-venv \ |
| 18 |
texinfo \ |
| 19 |
&& rm -rf /var/lib/apt/lists/* |
| 20 |
|
| 21 |
# compile and install liblouis |
| 22 |
ADD . /usr/src/liblouis |
| 23 |
WORKDIR /usr/src/liblouis |
| 24 |
RUN ./autogen.sh && ./configure --enable-ucs4 && make && make install && ldconfig |
| 25 |
|
| 26 |
# install python bindings into an isolated venv, so we don't need to touch |
| 27 |
# Debian's externally-managed system Python environment |
| 28 |
RUN python3 -m venv /opt/liblouis-venv |
| 29 |
ENV PATH="/opt/liblouis-venv/bin:$PATH" |
| 30 |
WORKDIR /usr/src/liblouis/python |
| 31 |
RUN pip install . |
| 32 |
|
| 33 |
# clean up |
| 34 |
WORKDIR /root |
| 35 |
RUN rm -rf /usr/src/liblouis |