Skip to content

Commit

Permalink
Merge pull request #27 from customink/BuildOpt
Browse files Browse the repository at this point in the history
Build package/opt Directory. DRY Usage.
  • Loading branch information
metaskills committed Oct 10, 2022
2 parents 8117869 + 0503231 commit 22e7895
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
6 changes: 6 additions & 0 deletions bin/build-arch
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ chmod +x "$BIN"
zip -r "${BIN}.zip" "$BIN"
zip -r "libcrypteia-${BUILD_ARCH}.zip" "$LIB"
cd ..

rm -rf ./package/opt
mkdir -p ./package/opt/extensions
mkdir -p ./package/opt/lib
cp "./build/crypteia-${BUILD_ARCH}" ./package/opt/extensions/crypteia
cp "./build/libcrypteia-${BUILD_ARCH}.so" ./package/opt/lib/libcrypteia.so
6 changes: 1 addition & 5 deletions package/Dockerfile-amzn
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
FROM alpine
LABEL org.opencontainers.image.source "https://github.com/customink/crypteia"
LABEL org.opencontainers.image.description "Rust Lambda Extension for any Runtime to preload SSM Parameters as Secure Environment Variables!"

RUN mkdir -p /opt/lib
RUN mkdir -p /opt/extensions
COPY ./build/crypteia-amzn /opt/extensions/crypteia
COPY ./build/libcrypteia-amzn.so /opt/lib/libcrypteia.so
COPY ./package/opt /opt
6 changes: 1 addition & 5 deletions package/Dockerfile-debian
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
FROM alpine
LABEL org.opencontainers.image.source "https://github.com/customink/crypteia"
LABEL org.opencontainers.image.description "Rust Lambda Extension for any Runtime to preload SSM Parameters as Secure Environment Variables!"

RUN mkdir -p /opt/lib
RUN mkdir -p /opt/extensions
COPY ./build/crypteia-debian /opt/extensions/crypteia
COPY ./build/libcrypteia-debian.so /opt/lib/libcrypteia.so
COPY ./package/opt /opt
6 changes: 0 additions & 6 deletions package/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ if [ -z "${S3_BUCKET_NAME}" ]; then
exit 1
fi

mkdir -p ./package/opt/extensions
mkdir -p ./package/opt/lib

cp ./build/crypteia-amzn ./package/opt/extensions/crypteia
cp ./build/libcrypteia-amzn.so ./package/opt/lib/libcrypteia.so

cd ./package/opt
zip -r package.zip .
mv package.zip ..
Expand Down

0 comments on commit 22e7895

Please sign in to comment.