-
-
Notifications
You must be signed in to change notification settings - Fork 796
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ea4437
commit 87bab9c
Showing
9 changed files
with
5,207 additions
and
290 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...offline/layers/21f354bb3255cd3a7faa5927635d2b493b52623f953b137174594174749e0644/bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
set -euo pipefail | ||
|
||
# Initialization - load function handler | ||
source $LAMBDA_TASK_ROOT/"$(echo $_HANDLER | cut -d. -f1).sh" | ||
|
||
# Processing | ||
while true; do | ||
HEADERS="$(mktemp)" | ||
# Get an event | ||
EVENT_DATA=$(curl -sS -LD "$HEADERS" -X GET "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/next") | ||
REQUEST_ID=$(grep -Fi Lambda-Runtime-Aws-Request-Id "$HEADERS" | tr -d '[:space:]' | cut -d: -f2) | ||
|
||
# Execute the handler function from the script | ||
RESPONSE=$($(echo "$_HANDLER" | cut -d. -f2) "$EVENT_DATA") | ||
|
||
# Send the response | ||
curl -s -X POST "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/$REQUEST_ID/response" -d "$RESPONSE" -o /dev/null | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:16-bullseye-slim | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
ARG UID=1000 | ||
ARG GID=1000 | ||
RUN groupmod -g ${GID} node && usermod -u ${UID} -g ${GID} node | ||
|
||
COPY install_docker.sh . | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& sh install_docker.sh \ | ||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* | ||
|
||
USER node | ||
ENV HOME=/home/node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
tests/scenario/docker/docker-in-docker/app/install_docker.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
|
||
apt-get update | ||
apt-get remove docker | ||
apt-get install -y \ | ||
ca-certificates \ | ||
curl \ | ||
gnupg \ | ||
lsb-release | ||
mkdir -p /etc/apt/keyrings | ||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --batch --dearmor -o /etc/apt/keyrings/docker.gpg | ||
echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | | ||
tee /etc/apt/sources.list.d/docker.list >/dev/null | ||
|
||
apt-get update | ||
apt install -y docker-ce-cli docker-compose-plugin | ||
|
||
groupadd docker | ||
usermod -aG docker node |
Oops, something went wrong.