File tree Expand file tree Collapse file tree 8 files changed +40
-20
lines changed Expand file tree Collapse file tree 8 files changed +40
-20
lines changed Original file line number Diff line number Diff line change 11FROM public.ecr.aws/amazonlinux/amazonlinux:2023
22
3- RUN dnf install -y gcc openssl-devel python3-pip
4- RUN dnf clean all
5-
63RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7- ENV PATH="/root/.cargo/bin:${PATH}"
4+ ENV PATH="~/.cargo/bin:${PATH}"
5+
6+ RUN ~/.cargo/bin/rustup update \
7+ && ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu
88
9- RUN /root/.cargo/bin/rustup update \
10- && /root/.cargo/bin/rustup target add aarch64-unknown-linux-gnu
119RUN rustup default stable
12- WORKDIR /var/task
10+
11+ # Install required build dependencies
12+ RUN dnf install -y gcc openssl-devel python3-pip util-linux && \
13+ pip3 install setuptools && \
14+ dnf clean all
1315
1416ENV CRYPTEIA_BUILD_OS=amzn
1517ENV CRYPTEIA_BUILD_TARGET=x86_64-unknown-linux-gnu
18+
Original file line number Diff line number Diff line change 11FROM public.ecr.aws/amazonlinux/amazonlinux:2023
22
3- RUN dnf install -y gcc openssl-devel python3-pip
4- RUN dnf clean all
5-
63RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7- ENV PATH="/root/.cargo/bin:${PATH}"
4+ ENV PATH="~/.cargo/bin:${PATH}"
5+
6+ RUN ~/.cargo/bin/rustup update \
7+ && ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu
88
9- RUN /root/.cargo/bin/rustup update \
10- && /root/.cargo/bin/rustup target add aarch64-unknown-linux-gnu
119RUN rustup default stable
12- WORKDIR /var/task
10+
11+ # Install required build dependencies
12+ RUN dnf install -y gcc openssl-devel python3-pip util-linux && \
13+ pip3 install setuptools && \
14+ dnf clean all
1315
1416ENV CRYPTEIA_BUILD_OS=amzn
1517ENV CRYPTEIA_BUILD_TARGET=aarch64-unknown-linux-gnu
Original file line number Diff line number Diff line change 1- FROM public.ecr.aws/lambda/provided:al2023
1+ FROM public.ecr.aws/lambda/nodejs:20
22
33COPY build/crypteia-amzn /opt/extensions/crypteia
44COPY build/libcrypteia-amzn.so /opt/lib/libcrypteia.so
@@ -10,5 +10,4 @@ ENV EXISTING=existingvalue
1010ENV LD_PRELOAD=/opt/lib/libcrypteia.so
1111
1212# For assert.sh support
13- RUN dnf install -y util-linux
14- RUN dnf clean all
13+ RUN dnf install -y util-linux && dnf clean all
Original file line number Diff line number Diff line change 1+ FROM public.ecr.aws/lambda/nodejs:20-arm64
2+
3+ COPY build/crypteia-amzn-arm64 /opt/extensions/crypteia
4+ COPY build/libcrypteia-amzn-arm64.so /opt/lib/libcrypteia.so
5+
6+ ENV CRYPTEIA_BUILD_OS=amzn
7+ ENV SKIP_CARGO_TEST=1
8+
9+ ENV EXISTING=existingvalue
10+ ENV LD_PRELOAD=/opt/lib/libcrypteia.so
11+
12+ # For assert.sh support
13+ RUN dnf install -y util-linux && dnf clean all
14+
Original file line number Diff line number Diff line change @@ -11,3 +11,4 @@ docker run \
1111 --entrypoint " ./bin/setup" \
1212 --volume " ${PWD} :/var/task" \
1313 crypteia-lambda-amzn2023
14+
Original file line number Diff line number Diff line change 22set -e
33
44echo " == [amzn2023/Dockerfile-arm64] building... =="
5- docker build --platform= linux/arm64 --tag crypteia-lambda-amzn2023-arm64 --file amzn2023/Dockerfile-arm64 .
5+ docker build --platform linux/arm64 --tag crypteia-lambda-amzn2023-arm64 --file amzn2023/Dockerfile-arm64 .
66
77echo " == [amzn2023/Dockerfile-arm64] bin/setup =="
88docker run \
9+ --platform linux/arm64 \
910 --rm \
1011 --user root \
1112 --entrypoint " ./bin/setup" \
1213 --volume " ${PWD} :/var/task" \
13- --platform=linux/arm64 \
1414 crypteia-lambda-amzn2023-arm64
Original file line number Diff line number Diff line change @@ -21,3 +21,4 @@ docker run \
2121 --volume " ${PWD} :/var/task" \
2222 --env TEST_LANG=node \
2323 crypteia-lambda-amzn2023-test
24+
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ if [ -z "${CRYPTEIA_BUILD_TARGET}" ]; then
1414 export CRYPTEIA_BUILD_TARGET=" x86_64-unknown-linux-gnu"
1515 ;;
1616 * )
17- echo " Unsupported architecture: $( uname -m) "
17+ echo " Unsupported architecture: $( uname -m) " >&2
1818 exit 1
1919 ;;
2020 esac
You can’t perform that action at this time.
0 commit comments