Skip to content

Commit e358378

Browse files
authored
fix: add libexpat to raster build (#486)
1 parent 7fc0b0a commit e358378

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

raster_api/runtime/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
FROM --platform=linux/amd64 public.ecr.aws/sam/build-python3.12:latest
22

3+
RUN dnf install -y gcc-c++
4+
35
WORKDIR /tmp
46

57
COPY raster_api/runtime /tmp/raster
68
RUN pip install mangum /tmp/raster["psycopg-binary"] -t /asset --no-binary pydantic
79
RUN rm -rf /tmp/raster
10+
RUN cp /usr/lib64/libexpat.so.1 /asset/
811

912
# # Reduce package size and remove useless files
1013
RUN cd /asset && find . -type f -name '*.pyc' | while read f; do n=$(echo $f | sed 's/__pycache__\///' | sed 's/.cpython-[0-9]*//'); cp $f $n; done;
@@ -14,8 +17,9 @@ RUN find /asset -type d -a -name 'tests' -print0 | xargs -0 rm -rf
1417
RUN rm -rdf /asset/numpy/doc/ /asset/boto3* /asset/botocore* /asset/bin /asset/geos_license /asset/Misc
1518

1619
COPY raster_api/runtime/handler.py /asset/handler.py
20+
RUN dnf remove -y gcc-c++
1721

1822
WORKDIR /asset
1923
RUN python -c "from handler import handler; print('All Good')"
2024

21-
CMD ["echo", "hello world"]
25+
CMD ["echo", "hello world"]

0 commit comments

Comments
 (0)