File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2+ set -euo pipefail
23
34# Build the container
4- docker buildx build --platform linux/amd64 -f poppler.Dockerfile -t poppler-lambda-layer-amd64 .
5+ docker buildx build --platform linux/amd64 -f ./layers/ poppler.Dockerfile -t poppler-lambda-layer-amd64 ./layers
56
67# Run a container and copy out the zip then delete it
78CONTAINER_ID=$( docker create --platform linux/amd64 poppler-lambda-layer-amd64)
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2+ set -euo pipefail
23
34# Build the container
4- docker buildx build --platform linux/arm64 -f poppler.Dockerfile -t poppler-lambda-layer-arm64.
5+ docker buildx build --platform linux/arm64 -f ./layers/ poppler.Dockerfile -t poppler-lambda-layer-arm64 ./layers
56
67# Run a container and copy out the zip then delete it
78CONTAINER_ID=$( docker create --platform linux/arm64 poppler-lambda-layer-arm64)
Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ FROM public.ecr.aws/lambda/provided:al2023 AS builder
33
44# Install required dependencies
55RUN dnf -y update && \
6- dnf -y install poppler poppler-utils poppler-data && \
6+ dnf -y install poppler poppler-utils poppler-data zip && \
77 dnf clean all
88
99# Copy bundling helper script
1010COPY ./copy-dep.sh /tmp/copy-dep.sh
1111
1212# Create output bundle directory
13- RUN mkdir -p /bundle/opt/bin /bundle/opt/lib /bundle/opt/fonts /bundle/opt/fontconfig /bundle/opt/poppler-data
13+ RUN mkdir -p /bundle/opt/bin /bundle/opt/lib /bundle/opt/etc /bundle/opt/etc/ fonts /bundle/opt/share /bundle/opt/share /poppler-data
1414
1515# Copy required cli tools and their dependencies
1616RUN chmod +x /tmp/copy-dep.sh && \
@@ -30,4 +30,4 @@ RUN cp -r /usr/share/fonts/* /bundle/opt/fonts/ && \
3030RUN chmod -R 755 /bundle/opt
3131
3232# Zip up the bundle as the layer
33- RUN zip /bundle /poppler-lambda-layer.zip
33+ RUN zip -r /poppler-lambda-layer.zip /bundle
You can’t perform that action at this time.
0 commit comments