Skip to content

Commit 363b0ef

Browse files
committed
feat: initial changes after the fork
- update README with proper links - refactor a little bit ignore files - update changelog (add missing newer Rust versions) - update Makefile defaults - add me to the license file Tested: - Local tests
1 parent e6137dd commit 363b0ef

File tree

7 files changed

+26
-21
lines changed

7 files changed

+26
-21
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
tests
2-
.git
2+
.git

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242
shell: bash
4343
run: |
4444
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
45-
make publish
45+
make publish

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.4.0-rust-1.54.0
2+
3+
* Upgrade to Rust [`1.54.0`](https://blog.rust-lang.org/2021/07/29/Rust-1.54.0.html)
4+
15
# 0.4.0-rust-1.45.2
26

37
* **Breaking change** in avoid mixed user permissions when volume mounting cargo cache directories. This docker images now configures a cargo installation to `/cargo` directory rather than `/home/root/.cargo`. You'll also want to ensure

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# https://github.com/lambci/docker-lambda#documentation
2-
FROM lambci/lambda:build-provided.al2
2+
FROM docker.io/lambci/lambda:build-provided.al2
33

4-
ARG RUST_VERSION=1.51.0
4+
ARG RUST_VERSION=1.54.0
55
RUN yum install -y jq openssl-devel
66
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
77
| CARGO_HOME=/cargo RUSTUP_HOME=/rustup sh -s -- -y --profile minimal --default-toolchain $RUST_VERSION

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2020 Doug Tangren
1+
Copyright (c) 2020 Doug Tangren, 2021 Alexander Zaitsev
22

33
Permission is hereby granted, free of charge, to any person obtaining
44
a copy of this software and associated documentation files (the

Makefile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1+
DOCKER ?= docker
12
VERSION ?= 0.4.0
2-
RUST_VERSION ?= 1.51.0
3-
REPO ?= softprops/lambda-rust
3+
RUST_VERSION ?= 1.54.0
4+
REPO ?= rustserverless/lambda-rust
45
TAG ?= "$(REPO):$(VERSION)-rust-$(RUST_VERSION)"
56

67
publish: build
7-
@docker push $(TAG)
8-
@docker push $(REPO):latest
8+
$(DOCKER) push $(TAG)
9+
$(DOCKER) push $(REPO):latest
910

1011
build:
11-
@docker build --build-arg RUST_VERSION=$(RUST_VERSION) -t $(TAG) .
12-
@docker tag $(TAG) $(REPO):latest
12+
$(DOCKER) build --build-arg RUST_VERSION=$(RUST_VERSION) -t $(TAG) .
13+
$(DOCKER) tag $(TAG) $(REPO):latest
1314

14-
test: build
15+
test:
1516
@tests/test.sh
1617

1718
debug: build
18-
@docker run --rm -it \
19+
$(DOCKER) run --rm -it \
1920
-u $(id -u):$(id -g) \
20-
-v ${PWD}:/code \
21+
-v ${PWD}:/code:Z \
2122
-v ${HOME}/.cargo/registry:/cargo/registry \
2223
-v ${HOME}/.cargo/git:/cargo/git \
2324
--entrypoint=/bin/bash \

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ where `{rust-stable-version}` is a stable version of rust.
1515

1616
You can find a list of available docker tags [here](https://hub.docker.com/r/softprops/lambda-rust/tags)
1717

18-
> 💡 If you don't find the version you're looking for, please [open a new github issue](https://github.com/softprops/lambda-rust/issues/new?title=I%27m%20looking%20for%20version%20xxx) to publish one
18+
> 💡 If you don't find the version you're looking for, please [open a new github issue](https://github.com/rust-serverless/lambda-rust/issues/new?title=I%27m%20looking%20for%20version%20xxx) to publish one
1919
20-
You can also depend directly on `softprops/lambda-rust:latest` for the most recently published version.
20+
You can also depend directly on `rustserverless/lambda-rust:latest` for the most recently published version.
2121

2222
## 🤸 usage
2323

@@ -45,7 +45,7 @@ $ docker run --rm \
4545
-v ${PWD}:/code \
4646
-v ${HOME}/.cargo/registry:/cargo/registry \
4747
-v ${HOME}/.cargo/git:/cargo/git \
48-
softprops/lambda-rust
48+
rustserverless/lambda-rust
4949
```
5050
> 💡 The -v (volume mount) flags for `/cargo/{registry,git}` are optional but when supplied, provides a much faster turn around when doing iterative development
5151
@@ -68,7 +68,7 @@ $ docker run --rm \
6868
-v ${PWD}:/code \
6969
-v ${HOME}/.cargo/registry:/cargo/registry \
7070
-v ${HOME}/.cargo/git:/cargo/git \
71-
softprops/lambda-rust
71+
rustserverless/lambda-rust
7272
```
7373

7474
For more custom codebases, the '-w' argument can be used to override the working directory.
@@ -82,7 +82,7 @@ $ docker run --rm \
8282
-v ${HOME}/.cargo/registry:/cargo/registry \
8383
-v ${HOME}/.cargo/git:/cargo/git \
8484
-w /code/lambdas/mylambda \
85-
softprops/lambda-rust
85+
rustserverless/lambda-rust
8686
```
8787

8888
## ⚓ using hooks
@@ -120,7 +120,7 @@ docker run \
120120
-v ${PWD}:/code \
121121
-v ${HOME}/.cargo/registry:/cargo/registry \
122122
-v ${HOME}/.cargo/git:/cargo/git \
123-
softprops/lambda-rust
123+
rustserverless/lambda-rust
124124

125125
# start a one-off docker container replicating the "provided.al2" lambda runtime
126126
# awaiting an event to be provided via stdin
@@ -197,4 +197,4 @@ $ cargo aws-lambda --help
197197
More instructions can be found [here](https://github.com/vvilhonen/cargo-aws-lambda).
198198
199199
200-
Doug Tangren (softprops) 2020
200+
Doug Tangren (softprops) 2020, Alexander Zaitsev (zamazan4ik) 2021

0 commit comments

Comments
 (0)