Skip to content

Commit 38d3c5c

Browse files
committed
feat: add Arm64 images support
- add Dockerfile for Arm64 based lambdas - update Makefile
1 parent 94adc11 commit 38d3c5c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Dockerfile_arm64

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM public.ecr.aws/lambda/provided:al2-arm
2+
3+
ARG RUST_VERSION=1.58.1
4+
RUN yum install -y jq openssl-devel gcc zip
5+
RUN set -o pipefail && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
6+
| CARGO_HOME=/cargo RUSTUP_HOME=/rustup sh -s -- -y --profile minimal --default-toolchain $RUST_VERSION
7+
COPY build.sh /usr/local/bin/
8+
COPY latest.sh /usr/local/bin/
9+
VOLUME ["/code"]
10+
WORKDIR /code
11+
ENTRYPOINT ["/usr/local/bin/build.sh"]

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ TAG ?= latest
66

77
publish: build
88
$(DOCKER) push $(REPO):${TAG}
9+
$(DOCKER) push $(REPO):${TAG}-arm64
910

1011
publish-tag: build publish
1112
$(DOCKER) tag $(REPO):${TAG} "$(REPO):$(INPUT_RELEASE_VERSION)-rust-$(RUST_VERSION)"
13+
$(DOCKER) tag "$(REPO):${TAG}-arm64" "$(REPO):$(INPUT_RELEASE_VERSION)-rust-$(RUST_VERSION)-arm64"
1214
$(DOCKER) push "$(REPO):$(INPUT_RELEASE_VERSION)-rust-$(RUST_VERSION)"
15+
$(DOCKER) push "$(REPO):$(INPUT_RELEASE_VERSION)-rust-$(RUST_VERSION)-arm64"
1316

1417
build:
1518
$(DOCKER) build --build-arg RUST_VERSION=$(RUST_VERSION) -t $(REPO):${TAG} .
19+
$(DOCKER) build --build-arg RUST_VERSION=$(RUST_VERSION) -t "$(REPO):${TAG}-arm64" -f Dockerfile_arm64 .
1620

1721
test:
1822
@tests/test.sh

0 commit comments

Comments
 (0)