-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (25 loc) · 851 Bytes
/
Dockerfile
File metadata and controls
30 lines (25 loc) · 851 Bytes
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
FROM golang:bullseye AS littlejohn
RUN git clone https://github.com/carboncredits/littlejohn.git
WORKDIR littlejohn
RUN go build
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.10.1
COPY --from=littlejohn /go/littlejohn/littlejohn /bin/littlejohn
RUN apt-get update -qqy && \
apt-get install -qy \
git \
libpq-dev \
python3-pip \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/cache/apt/*
# You must install numpy before anything else otherwise
# gdal's python bindings are sad. Pandas we full out as its slow
# to build, and this means it'll be cached
RUN pip config set global.break-system-packages true
RUN pip install gdal[numpy]==3.10.1
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . ./
RUN make lint && make type && make test
# Show the dependencies that passed in the log
RUN pip freeze