File tree Expand file tree Collapse file tree 4 files changed +80
-1
lines changed
Expand file tree Collapse file tree 4 files changed +80
-1
lines changed Original file line number Diff line number Diff line change 1- .PHONY : build clean coverage upload-coverage test upload
1+ .PHONY : build clean coverage upload-coverage test upload docker
2+
3+ DOCKER ?= docker
24
35build :
46 pyproject-build
2426
2527reformat :
2628 ruff format
29+
30+ docker :
31+ $(DOCKER ) build -t quay.io/ytekol/pyswip:latest -f docker/Dockerfile .
Original file line number Diff line number Diff line change 1+ FROM docker.io/debian:stable-slim AS build
2+
3+ RUN useradd -m sam
4+
5+ RUN \
6+ apt-get update && \
7+ apt-get upgrade -y && \
8+ apt-get install -y \
9+ curl \
10+ build-essential cmake ninja-build pkg-config \
11+ ncurses-dev libedit-dev \
12+ libgoogle-perftools-dev \
13+ libgmp-dev \
14+ libssl-dev \
15+ unixodbc-dev \
16+ zlib1g-dev libarchive-dev \
17+ libossp-uuid-dev \
18+ libdb-dev \
19+ libpcre2-dev \
20+ libyaml-dev
21+
22+ WORKDIR /home/sam
23+ USER sam
24+
25+ RUN \
26+ curl -LO https://www.swi-prolog.org/download/stable/src/swipl-10.0.0.tar.gz && \
27+ tar xf swipl-10.0.0.tar.gz && \
28+ cd swipl-10.0.0 && \
29+ cmake \
30+ -B build \
31+ -G Ninja \
32+ -DINSTALL_DOCUMENTATION=OFF \
33+ -DBUILD_TESTING=OFF \
34+ -DCMAKE_INSTALL_PREFIX=/usr/lib/swi-prolog \
35+ -DCMAKE_BUILD_TYPE=PGO && \
36+ cmake --build build
37+
38+ USER root
39+
40+ RUN \
41+ cmake --install /home/sam/swipl-10.0.0/build
42+
43+
44+ FROM docker.io/debian:stable-slim
45+ LABEL authors="Yuce Tekol"
46+
47+ RUN useradd -m sam
48+
49+ COPY --from=build /usr/lib/swi-prolog /usr/lib/swi-prolog
50+
51+ RUN \
52+ ln -s /usr/lib/swi-prolog/bin/swipl /bin/swipl
53+
54+ RUN \
55+ apt-get update && \
56+ apt-get upgrade -y && \
57+ apt-get install -y \
58+ libtcmalloc-minimal4t64 \
59+ python3
60+
61+ COPY ./docker/etc/update-motd.d/10-help-text /etc/update-motd.d/10-help-text
62+ COPY ./docker/etc/update-motd.d/50-motd-news /etc/update-motd.d/50-motd-news
63+ COPY ./src/pyswip /usr/lib/python3.13/pyswip
64+
65+ WORKDIR /home/sam
66+ USER sam
67+
68+ ENTRYPOINT ["python3" ]
Original file line number Diff line number Diff line change 1+ # help-text
2+
3+ Nothing here, yet.
Original file line number Diff line number Diff line change 1+ # motd-news
2+
3+ Nothing here, yet.
You can’t perform that action at this time.
0 commit comments