-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.core
50 lines (41 loc) · 1.61 KB
/
Dockerfile.core
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# =============================================================================
# This Dockerfile implements a Docker container to run GeodataFlow (core).
#
# @Build:
# docker build -f ./Dockerfile.core -t geodataflow/cli:1.0.0 .
# docker image rmi geodataflow/cli:1.0.0
#
# @Env:
# PACKAGE_WITH_GEODATAFLOW_PIPELINE_CONTEXT="geodataflow.core"
#
# @Usage:
# docker run --rm --name gdf geodataflow/cli:1.0.0 --help
# docker run --rm --name gdf geodataflow/cli:1.0.0 --modules
#
# For interactive process:
# docker run --rm -it --entrypoint "bash" geodataflow/cli:1.0.0
#
# =============================================================================
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.6.4
LABEL maintainer="Alvaro Huarte <[email protected]>"
# Active PipelineContext.
ENV PACKAGE_WITH_GEODATAFLOW_PIPELINE_CONTEXT="geodataflow.core"
RUN echo "INFO: This Docker container provides the GeodataFlow CLI (core)!"
RUN set -x && \
apt-get update && \
apt-get install -y python3-pip wget --no-install-recommends && \
apt-get autoclean && \
apt-get autoremove && \
rm -rf /var/lib/{apt,dpkg,cache,log}
# Include GeodataFlow.
COPY ./geodataflow/core/geodataflow /app/geodataflow
COPY ./geodataflow/core/requirements.txt /app
WORKDIR /app
# Clean existing "__pycache__" directories.
RUN find . -name "__pycache__" -type d -prune -exec rm -rf '{}' +
# Install python dependencies.
RUN pip3 install --no-cache-dir --requirement requirements.txt
RUN echo "INFO: Everything installed!"
RUN echo "INFO: You can run Geospatial workflows, type '--help'."
# Set entrypoint.
ENTRYPOINT ["python", "geodataflow/pipelineapp.py"]