Skip to content

Commit 17366e3

Browse files
authored
Merge pull request #28 from customink/scratch-format-ltrace
Shrink extensions with scratch, add ltrace for dev, and format
2 parents 4d9368c + ec5fe34 commit 17366e3

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

.devcontainer/Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
FROM mcr.microsoft.com/vscode/devcontainers/rust
22

3-
RUN sudo apt-get update -y && \
4-
sudo apt-get upgrade -y && \
5-
sudo apt-get install zip musl-tools -y
3+
RUN sudo apt-get update -y \
4+
&& sudo apt-get upgrade -y \
5+
&& sudo apt-get install zip musl-tools ltrace -y
66

7-
RUN rustup update && \
8-
rustup target add x86_64-unknown-linux-musl
7+
RUN rustup update \
8+
&& rustup target add x86_64-unknown-linux-musl
99

1010
RUN sudo apt-get install -y nodejs
1111

12-
RUN cd /tmp && \
13-
curl -L https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip > aws-sam-cli-linux-x86_64.zip && \
14-
unzip aws-sam-cli-linux-x86_64.zip -d sam-installation && \
15-
rm -rf aws-sam-cli-linux-x86_64.zip && \
16-
sudo ./sam-installation/install
12+
RUN cd /tmp \
13+
&& curl -L https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip > aws-sam-cli-linux-x86_64.zip \
14+
&& unzip aws-sam-cli-linux-x86_64.zip -d sam-installation \
15+
&& rm -rf aws-sam-cli-linux-x86_64.zip \
16+
&& sudo ./sam-installation/install

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## Unreleased
9+
10+
### Added
11+
12+
- `ltrace` for debugging
13+
14+
### Changed
15+
16+
- Use `scratch` base instead of `alpine` for smaller lambda extension images.
17+
818
## [0.94.0] - 2022-10-03
919

1020
Schedule release. No changes.

package/Dockerfile-amzn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine
1+
FROM scratch
22
LABEL org.opencontainers.image.source "https://github.com/customink/crypteia"
33
LABEL org.opencontainers.image.description "Rust Lambda Extension for any Runtime to preload SSM Parameters as Secure Environment Variables!"
44
COPY ./package/opt /opt

package/Dockerfile-debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine
1+
FROM scratch
22
LABEL org.opencontainers.image.source "https://github.com/customink/crypteia"
33
LABEL org.opencontainers.image.description "Rust Lambda Extension for any Runtime to preload SSM Parameters as Secure Environment Variables!"
44
COPY ./package/opt /opt

test/libcrypteia.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo "============================="
1414
echo "== Simulating crypteia binary JSON write =="
1515
echo '{
1616
"SECRET": "1A2B3C4D5E6F",
17-
"ACCESS_KEY": "G7H8I9J0K1L2",
17+
"ACCESS_KEY": "G7H8I9J0K1L2",
1818
"DB_URL": "mysql2://u:p@host:3306",
1919
"NR_KEY": "z6y5x4w3v2u1"
2020
}' > $CRYPTEIA_ENV_FILE
@@ -38,7 +38,7 @@ assert "./test/libcrypteia/_envfile.sh" \
3838

3939
assert "./test/libcrypteia/empty-${TEST_LANG}.sh" \
4040
"undefined"
41-
41+
4242
assert "./test/libcrypteia/fullpath-${TEST_LANG}.sh" \
4343
"x-crypteia-ssm-path:/crypteia/v5/myapp/envs" \
4444
"Because not replaced by a single env var."

0 commit comments

Comments
 (0)