Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (48 loc) · 1.89 KB
/
Copy pathDockerfile
File metadata and controls
54 lines (48 loc) · 1.89 KB
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
51
52
53
54
# Build with docker-compose.maintain.yml. Users pull this image and run docker-compose.yml.
FROM mambaorg/micromamba:1.5.10-bookworm
ARG MAMBA_DOCKERFILE_ACTIVATE=1
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
BACKEND_DIR=/app \
DATA_DIR=/var/tmp/core-stack-data \
MAMBA_DOCKERFILE_ACTIVATE=1
USER root
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gdal-bin \
libpq5 \
p7zip-full \
procps \
unzip \
wget \
&& rm -rf /var/lib/apt/lists/*
COPY installation/environment.yml /tmp/environment.yml
RUN micromamba create -y -n corestackenv -f /tmp/environment.yml \
&& micromamba clean --all --yes \
&& rm -f /tmp/environment.yml
ENV PATH="/opt/conda/envs/corestackenv/bin:${PATH}" \
MAMBA_DEFAULT_ENV=corestackenv
WORKDIR /app
COPY . /app
COPY installation/docker/entrypoint.sh \
installation/docker/app-init.sh \
installation/docker/database-init.sh \
installation/docker/geoserver-init.sh \
installation/docker/gee-config.sh \
installation/docker/download-data.sh \
/usr/local/bin/
RUN (micromamba run -n corestackenv python -m pip uninstall -y geetools || true) \
&& micromamba install -y -n corestackenv -c conda-forge --force-reinstall geetools=1.15.0 \
&& micromamba run -n corestackenv python -c "import geetools; from geetools.ee_asset import Asset; print('geetools', geetools.__version__)" \
&& micromamba clean --all --yes \
&& chmod +x /usr/local/bin/entrypoint.sh \
/usr/local/bin/app-init.sh \
/usr/local/bin/database-init.sh \
/usr/local/bin/geoserver-init.sh \
/usr/local/bin/gee-config.sh \
/usr/local/bin/download-data.sh \
&& mkdir -p /app/data/gee_confs /var/tmp/core-stack-data
EXPOSE 8000
ENTRYPOINT ["/usr/local/bin/_entrypoint.sh"]
CMD ["/usr/local/bin/entrypoint.sh"]