-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (29 loc) · 1 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
FROM lambgeo/lambda-gdal:3.2-al2 as gdal
# We use lambci docker image for the runtime
FROM lambci/lambda:build-python3.7
# Bring C libs from lambgeo/lambda-gdal image
COPY --from=gdal /opt/lib/ /opt/lib/
COPY --from=gdal /opt/include/ /opt/include/
COPY --from=gdal /opt/share/ /opt/share/
COPY --from=gdal /opt/bin/ /opt/bin/
ENV \
GDAL_DATA=/opt/share/gdal \
PROJ_LIB=/opt/share/proj \
GDAL_CONFIG=/opt/bin/gdal-config \
GEOS_CONFIG=/opt/bin/geos-config \
PATH=/opt/bin:$PATH
# Set some useful env
ENV \
LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
CFLAGS="--std=c99"
ENV PACKAGE_PREFIX=/var/task
# Copy any local files to the package
COPY . ${PACKAGE_PREFIX}/
RUN pip install -r requirements.txt --no-cache-dir --no-binary :all: -t $PREFIX/python
#--no-cache-dir --no-binary :all: -t $PREFIX/python
# RUN ["python3", "package.py" ]
# Move some files around
RUN cp -r /var/lang/lib/python3.7/site-packages/* ${PACKAGE_PREFIX}/
# Create package.zip
RUN cd $PACKAGE_PREFIX && zip -r9q /tmp/package.zip *