-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
45 lines (39 loc) · 1.32 KB
/
Dockerfile
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
FROM harbor.containers.wurnet.nl/isric/pycsw:2.9.11
#locally, build pcsw image first as docker build -t isric/pycsw .
#FROM isric/pycsw:latest
#FROM geopython/pycsw
USER root
# ARGS
ARG TIMEZONE="Europe/Amsterdam"
ARG LOCALE="en_US.UTF-8"
#nano, sync for operations
ARG ADD_DEB_PACKAGES="nano nmap rsync sqlite3"
#for sld creation
ARG ADD_PIP_PACKAGES=""
ENV TZ=${TIMEZONE} \
DEBIAN_FRONTEND="noninteractive" \
DEB_BUILD_DEPS="tzdata build-essential apt-utils" \
DEB_PACKAGES="locales python3-pip gdal-bin libgdal-dev python3-dev ${ADD_DEB_PACKAGES}"
RUN \
# Install dependencies
apt-get update \
&& apt-get --no-install-recommends install -y ${DEB_BUILD_DEPS} ${DEB_PACKAGES} \
# Timezone
&& cp /usr/share/zoneinfo/${TZ} /etc/localtime\
&& dpkg-reconfigure tzdata \
# Locale
&& sed -i -e "s/# ${LOCALE} UTF-8/${LOCALE} UTF-8/" /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG=${LOCALE} \
&& echo "For ${TZ} date=$(date)" && echo "Locale=$(locale)"
COPY . /pyGeoDataCrawler
WORKDIR /pyGeoDataCrawler
RUN apt --no-install-recommends install -y software-properties-common
RUN pip install poetry
RUN gdal-config --version
RUN poetry run pip install GDAL==3.4.3
#RUN poetry add gdal==3.4.3
RUN poetry install
#RUN poetry build
#RUN poetry shell
ENTRYPOINT ["tail", "-f", "/dev/null"]