-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathnodejs
More file actions
38 lines (28 loc) · 959 Bytes
/
nodejs
File metadata and controls
38 lines (28 loc) · 959 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
31
32
33
34
35
36
37
38
ARG GDAL_VERSION_TAG
ARG RUNTIME_VERSION
FROM ghcr.io/lambgeo/lambda-gdal:${GDAL_VERSION_TAG} as gdal
FROM public.ecr.aws/lambda/nodejs:${RUNTIME_VERSION}
LABEL maintainer="lambgeo <geolambdas@gmail.com>"
ENV \
LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
CFLAGS="--std=c99"
# The PREFIX should be the same as in gdal{version}:latest
# When building rasterio, setup.py will get libs directoy from gdal-config
# $ gdal-config --libs
# -L/opt/lib -lgdal
ENV PREFIX=/opt
COPY --from=gdal /opt/lib/ $PREFIX/lib/
COPY --from=gdal /opt/include/ $PREFIX/include/
COPY --from=gdal /opt/share/ $PREFIX/share/
COPY --from=gdal /opt/bin/ $PREFIX/bin/
ENV \
GDAL_DATA=$PREFIX/share/gdal \
PROJ_LIB=$PREFIX/share/proj \
GDAL_CONFIG=$PREFIX/bin/gdal-config \
GEOS_CONFIG=$PREFIX/bin/geos-config \
PATH=$PREFIX/bin:$PATH
RUN export GDAL_VERSION=$(gdal-config --version)
RUN mkdir ${PREFIX}/nodejs
RUN mkdir ${PREFIX}/nodejs/node_modules
ENTRYPOINT bash