Skip to content

Commit 3f90295

Browse files
committed
Add mapscript to Docker image
1 parent 22e428e commit 3f90295

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docker/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ RUN cmake .. \
4949
-DWITH_PYTHON=1 \
5050
-DWITH_MSSQL2008=0
5151

52+
RUN cmake --build . --target pythonmapscript-wheel
5253
RUN ninja install
5354

54-
# Run the make command for pythonmapscript-wheel
55-
# RUN cmake --build . --target pythonmapscript-wheel
56-
5755
FROM gdal AS runner
5856
LABEL maintainer="[email protected]"
5957
SHELL ["/bin/bash", "-o", "pipefail", "-cux"]
@@ -104,13 +102,18 @@ EXPOSE 8080
104102
COPY --from=builder /usr/local/bin /usr/local/bin/
105103
COPY --from=builder /usr/local/lib /usr/local/lib/
106104
COPY --from=builder /usr/local/share/mapserver /usr/local/share/mapserver/
105+
# copy the mapscript wheel
106+
COPY --from=builder /src/build/src/mapscript/python/dist /usr/local/share/mapserver/python/
107107
COPY --from=builder /src/share/ogcapi/templates/html-bootstrap /usr/local/share/mapserver/ogcapi/templates/html-bootstrap/
108108
COPY --from=builder /src/share/ogcapi/templates/html-plain /usr/local/share/mapserver/ogcapi/templates/html-plain/
109109
COPY --from=builder /src/share/ogcapi/templates/html-index-bootstrap /usr/local/share/mapserver/ogcapi/templates/html-index-bootstrap/
110110
COPY --from=builder /src/share/ogcapi/templates/html-index-plain /usr/local/share/mapserver/ogcapi/templates/html-index-plain/
111111

112112
COPY runtime /
113113

114+
RUN apt-get install --no-install-recommends python3-pip --assume-yes
115+
RUN pip install --break-system-packages --no-index --find-links=/usr/local/share/mapserver/python mapscript
116+
114117
RUN ldconfig
115118

116119
ENV MS_DEBUGLEVEL=0 \

0 commit comments

Comments
 (0)