forked from GeoscienceAustralia/dea-conflux
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
53 lines (45 loc) · 1.24 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
46
47
48
49
50
51
52
53
FROM osgeo/gdal:ubuntu-small-3.6.3
ENV SHELL=bash
ENV DEBIAN_FRONTEND=non-interactive
# Update sources list.
RUN apt clean && apt update \
# Install basic tools for developer convenience.
&& apt install -y \
curl \
git \
tmux \
unzip \
vim \
# Install pip3.
&& apt install -y --fix-missing --no-install-recommends \
python3-pip \
&& python -m pip install --upgrade pip \
# For psycopg2
&& apt install -y libpq-dev \
# For hdstats
python3-dev \
build-essential \
# Clean up.
&& apt clean \
&& apt autoclean \
&& apt autoremove \
&& rm -rf /var/lib/{apt,dpkg,cache,log}
# Install AWS CLI.
WORKDIR /tmp
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
RUN unzip awscliv2.zip
RUN ./aws/install
# Copy requirements.txt and install python packages from requirements.txt.
RUN mkdir -p /conf
COPY requirements.txt /conf/
RUN pip install -r /conf/requirements.txt
# Copy source code.
RUN mkdir -p /code
WORKDIR /code
ADD . /code
# Install source code.
RUN echo "Installing deafrica-conflux through the Dockerfile."
RUN pip install --extra-index-url="https://packages.dea.ga.gov.au" .
RUN pip freeze && pip check
# Make sure it's working
RUN deafrica-conflux --version